Version 1.22.0-dev.10.0

Merge 728f460798b3c3a0bff330aaba5a17d92db51384 into dev
diff --git a/.travis.yml b/.travis.yml
index 0ec2814..7e4d785 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -84,6 +84,7 @@
 matrix:
   allow_failures:
     - env: ANALYZER=master DDC_BROWSERS=ChromeCanaryTravis
+    - env: ANALYZER=master CXX=clang++
 notifications:
   email:
     recipients:
diff --git a/BUILD.gn b/BUILD.gn
index 60a0dbd..033a324 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -121,6 +121,11 @@
     "--snapshot_location",
     rebase_path("$root_gen_dir"),
   ]
+  if (defined(is_fuchsia) && is_fuchsia_host) {
+    args += [
+      "--copy_libs"
+    ]
+  }
 }
 
 group("dart2js") {
@@ -167,3 +172,77 @@
     "runtime/bin:sample_extension",
   ]
 }
+
+
+# The rules below build a qemu Fuchsia OS image that includes the Dart tree
+# under /system/test/dart. Building this image is gated by the GN argument
+# 'dart_build_fuchsia_test_image' because building the image is slow.
+if (defined(is_fuchsia) && (is_fuchsia)) {
+  declare_args() {
+    dart_build_fuchsia_test_image = false
+  }
+
+  if (dart_build_fuchsia_test_image) {
+    action("generate_dart_test_manifest") {
+      testonly = true
+
+      deps = [
+        "//packages/gn:mkbootfs",
+      ]
+
+      output_prefix = "$target_gen_dir/dart_test_tree"
+      outputs = [
+        "$output_prefix.manifest",
+      ]
+
+      mode = "release"
+      if (is_debug) {
+        mode = "debug"
+      }
+
+      mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
+      user_manifest = "$mkbootfs_gen/user.bootfs.manifest"
+
+      script = "tools/gen_fuchsia_test_manifest.py"
+      args = [
+        "-m",
+        mode,
+        "-u",
+        rebase_path(user_manifest),
+        "-o",
+        rebase_path(output_prefix),
+      ]
+    }
+
+    action("generate_dart_test_image") {
+      testonly = true
+      deps = [
+        "runtime/bin:dart",
+        "runtime/bin:run_vm_tests",
+        "runtime/bin:process_test",
+        ":generate_dart_test_manifest",
+      ]
+
+      input = "$target_gen_dir/dart_test_tree.manifest"
+      inputs = [
+        input,
+      ]
+
+      output = "$root_out_dir/dart_test_tree.bin"
+      outputs = [
+        output,
+      ]
+
+      script = "//packages/gn/make_bootfs.py"
+      args = [
+        "--manifest",
+        rebase_path(input),
+        "--output-file",
+        rebase_path(output),
+        "--build-id-map",
+        rebase_path("$target_gen_dir/build_id_map"),
+        "--compress",
+      ]
+    }
+  }
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04f6877..b59769d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,20 @@
     #2      main (file:///Users/mit/tmp/tool/bin/main.dart:9:10)
     ```
 
+  * The `Null` type has been moved to the bottom of the type hierarchy. As such,
+    it is considered a subtype of every other type.
+
+    Examples:
+    ```
+    Null foo() => null;
+    int x = foo();
+    String x = foo();
+
+    List<Null> bar() => <Null>[];
+    List<int> = bar();
+    List<String> = bar();
+    ```
+
 ### Tool changes
 
 * Dart2Js
@@ -57,6 +71,17 @@
   * Make `pub run` run executables in spawned isolates. This lets them handle
     signals and use standard IO reliably.
 
+### Infrastructure changes
+
+  * The SDK now uses GN rather than gyp to generate its build files, which will
+    now be exclusively ninja flavored. Documentation can be found on our
+    [wiki](https://github.com/dart-lang/sdk/wiki/Building-with-GN). Also see the
+    help message of `tools/gn.py`. This change is in response to the deprecation
+    of gyp. Build file generation with gyp will continue to be available in this
+    release by setting the environment variable `DART_USE_GYP` before running
+    `gclient sync` or `gclient runhooks`, but this will be removed in a future
+    release.
+
 ## 1.21.0 - 2016-12-07
 
 ### Language
diff --git a/DEPS b/DEPS
index 17aaded..a9c1ea3 100644
--- a/DEPS
+++ b/DEPS
@@ -30,7 +30,7 @@
   "github_testing": "https://github.com/peter-ahe-google/testing.git",
 
   "gyp_rev": "@6ee91ad8659871916f9aa840d42e1513befdf638",
-  "co19_rev": "@f05d5aee5930bfd487aedf832fbd7b832f502b15",
+  "co19_rev": "@cf831f58ac65f68f14824c0b1515f6b7814d94b8",
 
   # Revisions of GN related dependencies.
   "buildtools_revision": "@39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa",
@@ -45,7 +45,7 @@
   "barback-0.14.0_rev": "@36398",
   "barback-0.14.1_rev": "@38525",
   "barback_tag" : "@0.15.2+9",
-  "bazel_worker_tag": "@0.1.1",
+  "bazel_worker_tag": "@0.1.2",
   "boolean_selector_tag" : "@1.0.2",
   "boringssl_gen_rev": "@1a810313a0290e1caace9da73fa3ab89995ad2c7",
   "boringssl_rev" : "@d519bf6be0b447fb80fbc539d4bff4479b5482a2",
@@ -59,7 +59,7 @@
   "csslib_tag" : "@0.13.2",
   "dart2js_info_tag" : "@0.5.0",
   "dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
-  "dart_style_tag": "@0.2.14",
+  "dart_style_tag": "@0.2.15",
   "dartdoc_tag" : "@v0.9.8+1",
   "fixnum_tag": "@0.10.5",
   "func_tag": "@0.1.0",
diff --git a/README.md b/README.md
index 8799041..2cea132 100644
--- a/README.md
+++ b/README.md
@@ -26,9 +26,9 @@
 
 You can also contribute patches, as described in [Contributing][contrib].
 
-## License
+## License & patents
 
-See [LICENSE][license].
+See [LICENSE][license] and [PATENTS][patents].
 
 [website]: https://www.dartlang.org
 [license]: https://github.com/dart-lang/sdk/blob/master/LICENSE
@@ -39,3 +39,4 @@
 [dartbug]: http://dartbug.com
 [contrib]: https://github.com/dart-lang/sdk/wiki/Contributing
 [pubsite]: https://pub.dartlang.org
+[patents]: https://github.com/dart-lang/sdk/blob/master/PATENTS
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 1f513f4..82761c3 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -2,6 +2,17 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+declare_args() {
+  # The optimization level to use for debug builds.
+  if (is_android) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    debug_optimization_level = "s"
+  } else {
+    debug_optimization_level = "2"
+  }
+}
+
 import("//build/config/android/config.gni")
 if (current_cpu == "arm") {
   import("//build/config/arm.gni")
@@ -226,6 +237,10 @@
         ]
       }
     } else if (current_cpu == "mipsel") {
+      # Some toolchains default to big-endian.
+      cflags += [ "-EL" ]
+      ldflags += [ "-EL" ]
+
       # We have to explicitly request exceptions to get good heap profiles from
       # tcmalloc.
       if (is_debug || is_release) {
@@ -292,16 +307,24 @@
   # Linux/Android common flags setup.
   # ---------------------------------
   if (is_linux || is_android) {
-    cflags += [ "-fPIC" ]
-
     ldflags += [
-      "-fPIC",
       "-Wl,-z,noexecstack",
       "-Wl,-z,now",
       "-Wl,-z,relro",
     ]
   }
 
+  # We need -fPIC:
+  # 1. On ARM and MIPS for tcmalloc.
+  # 2. On Android.
+  # 3. When using the sanitizers.
+  # Otherwise there is a performance hit, in particular on ia32.
+  if (is_android || is_asan || is_lsan || is_msan || is_tsan ||
+      (is_linux && (current_cpu == "arm" || current_cpu == "mipsel"))) {
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+  }
+
   # Linux-specific compiler flags setup.
   # ------------------------------------
   if (is_linux) {
@@ -731,21 +754,21 @@
     # The only difference on windows is that the inlining is less aggressive.
     # (We accept the default level). Otherwise it is very slow.
     cflags = [
-      "/O2",  # Do some optimizations.
+      "/O${debug_optimization_level}",  # Do some optimizations.
       "/Oy-",  # Disable omitting frame pointers, must be after /O2.
     ]
   } else if (is_android) {
     # On Android we kind of optimize some things that don't affect debugging
     # much even when optimization is disabled to get the binary size down.
     cflags = [
-      "-Os",
+      "-O${debug_optimization_level}",
       "-fdata-sections",
       "-ffunction-sections",
     ]
     ldflags = common_optimize_on_ldflags
   } else {
     cflags = [
-      "-O2",
+      "-O${debug_optimization_level}",
       "-fdata-sections",
       "-ffunction-sections",
     ]
diff --git a/docs/language/dart.sty b/docs/language/dart.sty
index 281692e..125c771 100644
--- a/docs/language/dart.sty
+++ b/docs/language/dart.sty
@@ -69,9 +69,9 @@
 \def\WITH{\keyword{with}}
 \def\YIELD{\keyword{yield}}
 
-\newenvironment{Q}[1]{{\bf #1}}
-\newenvironment{rationale}[1]{{\it #1}}
-\newenvironment{commentary}[1]{{\sf #1}}
+\newenvironment{Q}[1]{{\bf #1}}{}
+\newenvironment{rationale}[1]{{\it #1}}{}
+\newenvironment{commentary}[1]{{\sf #1}}{}
 
 \newenvironment{dartCode}[1][!ht] {
 %  \begin{verbatim}[#1]
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 1d41cf5..158a10f 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -8,13 +8,60 @@
 \usepackage[T1]{fontenc}
 \newcommand{\code}[1]{{\sf #1}}
 \title{Dart Programming Language  Specification  \\
-{4th edition draft}\\
+{5th edition draft}\\
 {\large Version 1.15.0}}
 
 % For information about Location Markers (and in particular the
 % commands \LMHash and \LMLabel), see the long comment at the
 % end of this file.
 
+% CHANGES
+% =======
+% Significant changes to the specification.
+%
+% 1.15
+% - Change how language specification describes control flow.
+% - Object initialization now specifies initialization order correctly.
+% - Specifies that leaving an await-for loop must wait for the subscription
+%   to be canceled.
+% - An await-for loop only pauses the subscription if it does something async.
+% - Assert statements may now also include a "message" operand.
+% - The Null type is now considered a subtype of all types in most cases.
+%
+% 1.14
+% - The call "C()" where "C" is a class name, is a now compile-time error.
+% - Changed description of rewrites that depended on a function literal.
+%   In many cases, the rewrite wasn't safe for asynchronous code.
+% - Removed generalized tear-offs.
+% - Allow "rethrow" to also end a switch case. Allow braces around switch cases.
+% - Allow using '=' as default-value separator for named parameters.
+% - Make it a compile-time error if a library includes the same part twice.
+% - Now more specific about the return types of sync*/async/async* functions
+%   in relation to return statements.
+% - Allow Unicode surrogate values in String literals.
+% - Make an initializing formal's value accessible in the initializer list.
+% - Allow any expression in assert statements (was only conditionalExpression).
+% - Allow trailing commas in argument and parameter lists.
+%
+% 1.11 - ECMA 408 - 4th Edition
+% - Specify that potentially constant expressions must be valid expressions
+%   if the parameters are non-constant.
+% - Make "??" a compile-time constant operator.
+% - Having multiple unnamed libraries no longer causes warnings.
+% - Specify null-aware operators for static methods.
+%
+% 1.10
+% - Allow mixins to have super-classes and super-calls.
+% - Specify static type checking for the implicit for-in iterator variable.
+% - Specify static types for a number of expressions where it was missing.
+% - Make calls on the exact type "Function" not cause warnings.
+% - Specify null-aware behavior of "e?.v++" and similar expressions.
+% - Specify that `package:` URIs are treated in an implementation dependent way.
+% - Require warning if for-in is used on object with no "iterator" member.
+%
+% 1.9 - ECMA-408 - 3rd Edition
+%
+
 \begin{document}
 \maketitle
 \tableofcontents
@@ -2337,12 +2384,12 @@
 
 %\begin{grammar}
 %classInterfaceInjection:
-      %class qualified typeParameters? interfaces '{\escapegrammar ;}'
+      %class qualified typeParameters? interfaces `{\escapegrammar ;}'
       %  .
 
 
 %interfaceInterfaceInjection:
-      %interface qualified typeParameters? superinterfaces '{\escapegrammar ;}'
+      %interface qualified typeParameters? superinterfaces `{\escapegrammar ;}'
     %.
 %\end{grammar}
 
@@ -2631,7 +2678,7 @@
 
 \LMHash{}
 The null object is the sole instance of the built-in class \code{Null}. Attempting to instantiate \code{Null} causes a run-time error. It is a compile-time error for a class to extend, mix in or implement \code{Null}.
-The \code{Null} class declares no methods except those also declared by \code{Object}.
+The \code{Null} class extends the \code{Object} class and declares no methods except those also declared by \code{Object}.
 
 \LMHash{}
 The static type of \NULL{} is the \code{Null} type.
@@ -5610,7 +5657,7 @@
 
  \begin{grammar}
 {\bf localVariableDeclaration:}
-    initializedVariableDeclaration {\escapegrammar';'}
+    initializedVariableDeclaration `{\escapegrammar ;}'
   .
  \end{grammar}
 
@@ -7358,7 +7405,7 @@
 	.
 
 {\bf functionTypeAlias:}
-       functionPrefix  typeParameters? formalParameterList '{\escapegrammar ;}'
+       functionPrefix  typeParameters? formalParameterList `{\escapegrammar ;}'
     .
 
     {\bf functionPrefix:}
@@ -7404,7 +7451,7 @@
 \begin{itemize}
 \item $T$ is $S$.
 \item $T$ is $\bot$.
-\item $T$ is \NULL{} and $S$ is not $\bot$.
+\item $T$ is \code{Null} and $S$ is not $\bot$.
 \item $S$ is \DYNAMIC{}.
 \item $S$ is a direct supertype of $T$.
 \item $T$ is a type parameter and $S$ is the upper bound of $T$.
@@ -7426,13 +7473,20 @@
 Although $<:$ is not a partial order on types, it does contain a partial order, namely $<<$. This means that, barring raw types, intuition about classical subtype rules does apply.
 }
 
+\commentary{
+The \code{Null} type is more specific than all non-$\bot$ types, even though
+it doesn't actually extend or implement those types.
+The other types are effectively treated as if they are {\em nullable},
+which makes \NULL{} assignable to them.
+}
+
 \LMHash{}
 $S$ is a supertype of $T$, written $S :> T$, iff $T$ is a subtype of $S$.
 
 \commentary{The supertypes of an interface are its direct supertypes and their supertypes. }
 
 \LMHash{}
-An interface type $T$ may be assigned to a type $S$, written  $T \Longleftrightarrow S$, iff either $T <: S$, $S <: T$, or either $T$ or $S$ is the \code{Null} type.
+An interface type $T$ may be assigned to a type $S$, written  $T \Longleftrightarrow S$, iff either $T <: S$, $S <: T$.
 
 \rationale{This rule may surprise readers accustomed to conventional typechecking. The intent of the $\Longleftrightarrow$ relation is not to ensure that an assignment is correct. Instead, it aims to only flag assignments that are almost certain to be erroneous, without precluding assignments that may work.
 
diff --git a/docs/language/informal/covariant-overrides.md b/docs/language/informal/covariant-overrides.md
new file mode 100644
index 0000000..1533324
--- /dev/null
+++ b/docs/language/informal/covariant-overrides.md
@@ -0,0 +1,894 @@
+# Covariant Overrides
+
+Owner: rnystrom@, eernstg@.
+
+## Summary
+
+Allow an overriding method to tighten a parameter type if it has the
+modifier `covariant`, using dynamic checks to ensure soundness. This
+provides a better user experience for a programming idiom that appears in
+many UI frameworks.
+
+Note that this feature is relevant in strong mode where parameter types
+cannot otherwise be tightened, but it affects standard mode Dart in the
+sense that the syntax should be accepted and ignored.
+
+## Informal specification
+
+We set out by giving the informal specification for the syntax of this
+feature (which is shared among standard mode and strong mode). Following
+that, we specify the other aspects of the feature in standard mode,
+followed by those other aspects in strong mode.
+
+### Syntax
+
+The set of built-in identifiers is extended with `covariant`. This means
+that the identifier `covariant` cannot be the name of a type. The grammar
+is updated as follows:
+
+```
+normalFormalParameter: // CHANGED
+  functionFormalParameter |
+  fieldFormalParameter |
+  simpleFormalParameter
+
+functionFormalParameter: // NEW
+  metadata 'covariant'? returnType? identifier formalParameterList
+
+simpleFormalParameter: // CHANGED
+  declaredIdentifier |
+  metadata 'covariant'? identifier
+
+declaredIdentifier: // CHANGED
+  metadata 'covariant'? finalConstVarOrType identifier
+
+declaration: // CHANGED: last alternative
+  constantConstructorSignature (redirection | initializers)? |
+  constructorSignature (redirection | initializers)? |
+  'external' constantConstructorSignature |
+  'external' constructorSignature |
+  ('external' 'static'?)? getterSignature |
+  ('external' 'static'?)? setterSignature |
+  'external'? operatorSignature |
+  ('external' 'static'?)? functionSignature |
+  'static' ('final' | 'const') type? staticFinalDeclarationList |
+  'final' type? initializedIdentifierList |
+  ('static' | 'covariant')? ('var' | type) initializedIdentifierList
+```
+
+### Standard mode
+
+The static analysis in standard mode ignores `covariant` modifiers, and so
+does the dynamic semantics.
+
+*This means that covariant overrides are essentially ignored in standard
+mode. The feature is useless because covariant parameter types are always
+allowed, but we wish to enable source code to be used in both standard and
+strong mode. So standard mode needs to include support for accepting and
+ignoring the syntax.*
+
+### Strong mode
+
+In strong mode, the covariant overrides feature affects the static analysis
+and dynamic semantics in several ways.
+
+#### Static checking
+
+In this section we discuss a few general issues; several larger subtopics
+are discussed in the following subsections.
+
+It is a compile-time error if the `covariant` modifier occurs on a
+parameter of a function which is not an instance method (which includes
+instance setters and instance operators). It is a compile-time error if the
+`covariant` modifier occurs on a variable declaration which is not a
+non-final instance variable.
+
+For a given parameter `p` in an instance method (including setter and
+operator) `m`, `p` is considered to be a **covariant parameter** if it has
+the modifier `covariant` or there is a direct or indirect supertype
+containing an overridden declaration of `m` where the parameter
+corresponding to `p` has the modifier `covariant`. For a type `T`, if
+multiple direct supertypes of `T` has a method `m` which is not overridden
+in `T`, each parameter of `m` is covariant iff that parameter is covariant
+in `m` in at least one of the supertypes.
+
+*In short, the property of being covariant is inherited, for each
+parameter. There is no conflict if only some overridden declarations have
+the `covariant` modifier, and others do not. The parameter is covariant iff
+at least one of them has it.*
+
+Function typing is unaffected by covariant overriding: When the type of a
+function is determined for a property extraction which tears off an
+instance method with one or more covariant parameters, the resulting type
+has no covariant parameters. Other expressions with a function type do not
+admit covariant parameters, and hence function types never include
+covariant parameters.
+
+*In particular, subtyping among function types is unaffected by covariant
+overriding, and so is type checking for invocations of first-class
+functions. Note that it is a non-trivial step to determine the run-time
+type of a torn off method, as described below.*
+
+An invocation of an instance method with one or more covariant parameters
+is checked as if no `covariant` modifiers had been present on any of the
+involved declarations.
+
+*From one point of view, covariant overrides are irrelevant for clients,
+it is a feature which is encapsulated in the invoked method. This is
+reflected in the typing. From another point of view, clients may need to
+provide arguments with a proper subtype of the one required in the static
+type, because there may be a dynamic check for that subtype. This is
+handled by developers using ad-hoc reasoning and suitable programming
+idioms. The whole point of this mechanism is to allow this.*
+
+##### Overriding
+
+The static warnings specified for override relationships among instance
+method declarations regarding the number and kind (named, positional) of
+parameters remain unchanged, except that any `covariant` modifiers are
+ignored.
+
+For a covariant parameter, the override rule is that its type must be
+either a supertype or a subtype of the type declared for the corresponding
+parameter in each of the directly or indirectly overridden declarations.
+
+*For a parameter which is not covariant, the override rule is is unchanged:
+its type must be a supertype of the type declared for the corresponding
+parameter in each directly overridden declaration. This includes the
+typical case where the type does not change, because any type is a
+supertype of itself. Override checking for return types is also unchanged.*
+
+##### Closurization
+
+The static type of a property extraction expression `e.m` which gives rise
+to closurization of a method (including an operator or a setter) which has
+one or more covariant parameters is the static type of the function `T.m`,
+where `T` is the static type of `e`, if `T.m` is defined. Otherwise the
+static type of `e.m` is `dynamic`.
+
+The static type of a property extraction expression `super.m` which gives
+rise to closurization of a method (including an operator or a setter)
+which has one or more covariant parameters is the static type of the
+function `T.m`, where `T` is the superclass of the enclosing class.
+
+In both cases, for the static type of the function `T.m`, all occurrences
+of the modifier `covariant` are ignored.
+
+*In short, the static type of a tear-off ignores covariant overrides. Note
+that this is not true for the dynamic type of the tear-off.*
+
+#### Dynamic semantics
+
+*The run-time semantics of the language with covariant overrides is the
+same as the run-time semantics of the language without that feature, except
+for the dynamic type of tear-offs, and except that some type checks which
+are not guaranteed to succeed based on static checks must be performed at
+run time.*
+
+A dynamic error occurs if a method with a covariant parameter `p` is
+invoked, and the binding for `p` is a value which is not `null` and whose
+run-time type is not a subtype of the type declared for `p`.
+
+##### The dynamic type of a closurized instance method
+
+The dynamic type of a function *f* which is created by closurization
+during evaluation of a property extraction expression is determined as
+follows:
+
+Let `m` be the name of the method (operator, setter) which is being
+closurized, let `T` be the type of the receiver, and let *D* be declaration
+of `m` in `T` or inherited by `T`.
+
+The return type of *f* the is the static return type of *D*. For each
+parameter `p` declared in *D* which is not covariant, the part in the
+dynamic type of *f* which corresponds to `p` is the static type of `p` in
+*D*. For each covariant parameter `q`, the part in the dynamic type of *f*
+which corresponds to `q` is `Object`.
+
+# Background Material
+
+The rest of this document contains motivations for having the covariant
+overrides feature, and discussions about it, leading to the design which is
+specified in the first part of this document.
+
+## Motivation
+
+In object-oriented class hierarchies, especially in user interface frameworks,
+it's fairly common to run into code like this:
+
+```dart
+class Widget {
+  void addChild(Widget widget) {...}
+}
+
+class RadioButton extends Widget {
+  void select() {...}
+}
+
+class RadioGroup extends Widget {
+  void addChild(RadioButton button) {
+    button.select();
+    super.addChild(button);
+  }
+}
+```
+
+Here, a `RadioGroup` is a kind of widget. It *refines* the base `Widget` interface
+by stating that its children must be `RadioButton`s and cannot be any arbitrary
+widget. Note that the parameter type in `RadioGroup.addChild()` is
+`RadioButton`, which is a subclass of `Widget`.
+
+This might seem innocuous at first, but it's actually statically unsound.
+Consider:
+
+```dart
+Widget widget = new RadioGroup(); // Upcast to Widget.
+widget.addChild(new Widget());    // Add the wrong kind of child.
+```
+
+Tightening a parameter type, that is, using a proper subtype of the existing
+one in an overriding definition, breaks the [Liskov substitution principle][].
+A `RadioGroup` doesn't support everything that its superclass Widget does.
+`Widget` claims you can add *any* kind of widget to it as a child, but
+`RadioGroup` requires it to be a `RadioButton`.
+
+[liskov substitution principle]: https://en.wikipedia.org/wiki/Liskov_substitution_principle
+
+Breaking substitutability is a little dubious, but in practice it works out
+fine. Developers can be careful and ensure that they only add the right kinds
+of children to their `RadioGroup`s. However, because this isn't *statically*
+safe, many languages disallow it, including Dart strong mode. (Dart 1.0
+permits it.)
+
+Instead, users must currently manually tighten the type in the body of the
+method:
+
+```dart
+class RadioGroup extends Widget {
+  void addChild(Widget widget) {
+    var button = widget as RadioButton;
+    button.select();
+    super.addChild(button);
+  }
+}
+```
+
+The declaration is now statically safe, since it takes the same type as the
+superclass method. The call to `select()` is safe because it's guarded by an
+explicit `as` cast. That cast is checked and will fail at runtime if the passed
+widget isn't actually a `RadioButton`.
+
+In most languages, this pattern is what you have to do. It has (at least) two
+problems. First, it's verbose. Many users intuitively expect to be able to
+define subclasses that refine the contracts of their superclasses, even though
+it's not strictly safe to do so. When they instead have to apply the above
+pattern, they are surprised, and find the resulting code ugly.
+
+The other problem is that this pattern leads to a worse static typing user
+experience. Because the cast is now hidden inside the body of the method, a user
+of `RadioGroup` can no longer see the tightened type requirement at the API level.
+
+If they read the generated docs for `addChild()` it appears to accept any old
+Widget even though it will blow up on anything other than a RadioGroup. In this
+code:
+
+```dart
+var group = new RadioGroup();
+group.addChild(new Widget());
+```
+
+There is no static error even though it's obviously statically incorrect.
+
+Anyone who has designed a widget hierarchy has likely run into this problem a
+couple of times. In particular, this showed up in a number of places in Flutter.
+
+In some cases, you can solve this using generics:
+
+```dart
+class Widget<T extends Widget> {
+  void addChild(T widget) {...}
+}
+
+class RadioButton extends Widget<Null> {
+  void select() {...}
+}
+
+class RadioGroup extends Widget<RadioButton> {
+  void addChild(RadioButton button) {
+    button.select();
+    super.addChild(button);
+  }
+}
+```
+
+In practice, this often doesn't work out. Often you have a family of related
+types, and making one generic means they all have to be, each with type
+parameters referring to the other. It often requires API consumers to make their
+own code generic simply to pass these objects around.
+
+## The covariant override feature
+
+Earlier, we showed the pattern users manually apply when they want to tighten a
+parameter type in a method override:
+
+```dart
+void addChild(Widget widget) {
+  var button = widget as RadioButton;
+  ...
+}
+```
+
+This proposal is roughly akin to syntactic sugar for that pattern. In this
+method, `widget` effectively has *two* types:
+
+*   The **original type** is the type that is declared on the method parameter.
+    Here, it's `Widget`. This type must follow the type system's rules for a
+    valid override in order to preserve the soundness guarantees of the
+    language.
+
+    With method parameters, that means the type must be equivalent to or a
+    supertype of the parameter type in the superclass and all of its
+    superinterfaces. This is the usual
+    [sound rule for function subtyping][contra].
+
+[contra]: https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)#Function_types
+
+*   The **desired type** is the type that the user wants to use inside the body
+    of the method. This is the real type that the overridden method requires in
+    order to function. Here, it's `RadioButton`.
+
+    The desired type is a subtype of the original type. Going from the original
+    type to the desired type is a downcast, which means the cast needs to be
+    checked and may fail at runtime.
+
+    Even though the desired type is ensconced in the body of the method in the
+    manual pattern, it really is part of the method's signature. If you are
+    calling `addChild()` *on an object that you statically know is a
+    RadioGroup*, you want the errors as if its declared type was the tighter
+    desired type, not the original one. This is something the manual pattern
+    can't express.
+
+So we need to understand the original type, the desired type, and when
+this feature comes into play. To enable it on a method parameter, you
+mark it with the contextual keyword `covariant`:
+
+```dart
+class Widget {
+  void addChild(covariant Widget widget) {...}
+}
+```
+
+Doing so says "A subclass may override this parameter with a tighter desired
+type". A subclass can then override it like so:
+
+```dart
+class RadioGroup extends Widget {
+  void addChild(RadioButton button) {
+    ...
+  }
+}
+```
+
+No special marker is needed in the overriding definition. The presence of
+`covariant` in the superclass is enough. The parameter type in the base class
+method becomes the *original type* of the overridden parameter. The parameter
+type in the derived method is the *desired type*.
+
+This approach fits well when a developer provides a library or framework where
+some parameter types were designed for getting tightened. For instance, the
+`Widget` hierarchy was designed like that.
+
+In cases where the supertype authors did not foresee this need, it is still
+possible to tighten a parameter type by putting the `covariant` modifier on
+the *overriding* parameter declaration.
+
+In general, a tightened type for a parameter `p` in a method `m` is allowed
+when at least one of the overridden declarations of `m` has a `covariant`
+modifier on the declaration corresponding to `p`.
+
+The `covariant` modifier can also be used on mutable fields. Doing so
+corresponds to marking the parameter in the implicitly generated setter
+for that field as `covariant`:
+
+```dart
+class Widget {
+  covariant Widget child;
+}
+```
+
+This is syntactic sugar for:
+
+```dart
+class Widget {
+  Widget _child;
+  Widget get child => _child;
+  set child(covariant Widget value) { _child = value; }
+}
+```
+
+#### Overriding rules
+
+With this feature, type checking of an overriding instance method or operator
+declaration depends on the `covariant` modifiers. For a given parameter
+`p` in a method or operator `m`, `p` is considered to be a **covariant
+parameter** if there is a direct or indirect supertype containing an overridden
+declaration of `m` where the parameter corresponding to `p` is marked
+`covariant`. In short, `covariant` is inherited, for each parameter. There is
+no conflict if only some overridden declarations have the `covariant` modifier
+and others do not, the parameter is covariant as soon as any one of them has
+it.
+
+We could have chosen to require that every supertype chain must make the
+parameter covariant, rather than just requiring that there exists such a
+supertype chain. This is a software engineering trade off: both choices
+can be implemented, and both choices provide a certain amount of protection
+against tightening types by accident. We have chosen the permissive variant,
+and it is always possible to make a linter require a stricter one.
+
+For a regular (non-covariant) parameter, the override rule is is unchanged:
+its type must be a supertype of the type declared for the same parameter in
+each directly overridden declaration. This includes the typical case where the
+type does not change, because any type is a supertype of itself.
+
+For a covariant parameter, the override rule is that its type must be either a
+supertype or a subtype of the type declared for the same parameter in each
+of the directly or indirectly overridden declarations.
+
+It is not enough to require a relationship with the directly overridden
+declarations: If we only required a subtype or supertype relation to each
+directly overridden declaration, we can easily create an example showing
+that there are no guarantees about the relationship between the statically
+known (original) parameter type and the actual (desired) parameter type
+at run time:
+
+```dart
+class A { void foo(int i) {...}}
+class B implements A { void foo(Object o) {...}}
+class C implements B { void foo(covariant String s) {...}}
+
+main() {
+  A a = new C();
+  a.foo(42); // Original type: int, desired type: String: Unrelated.
+}
+```
+
+Checking all overridden declarations may seem expensive, because all
+supertypes must be inspected in order to find those declarations. However, we
+expect that the cost can be kept at a reasonable level:
+
+First, covariant parameters are expected to be rare, and it is possible for
+a compiler to detect them at a reasonable cost: For each parameter, the status
+of being covariant or not covariant can be maintained by storing it after
+inspecting the stored value for that parameter in each directly overridden
+method. With that information available, it is cheap to detect whether a given
+method has any covariant parameters. If that is not the case then the override
+checks are unchanged, compared to the language without this feature.
+
+Otherwise the parameter is covariant, and in this case it will be necessary to
+find all overridden declarations (direct and indirect) for that method, and
+gather all types for that parameter. Given that overridden methods would
+themselves often have a corresponding covariant parameter, it may be worthwhile
+to cache the result. In that case there will be a set of types that occur as
+the declared type of the given parameter, and the check will then be to iterate
+over these overridden parameter types and verify that the overriding parameter
+type is a subtype or a supertype of each of them.
+
+#### Subtyping
+
+`covariant` modifiers are ignored when deciding subtype relationships among
+classes. So this:
+
+```dart
+var group = new RadioGroup();
+Widget widget = group;
+```
+
+... is perfectly fine.
+
+#### Method invocations
+
+Method invocations are checked according to the statically known receiver type,
+and all `covariant` modifiers are ignored. That is, we check against that which
+we called the original parameter types, and we ignore that the desired parameter
+type may be different. So this:
+
+```dart
+var group = new RadioGroup();
+group.addChild(new Widget()); // <--
+```
+
+... reports an error on the marked line. But this:
+
+```dart
+Widget widget = new RadioGroup();
+widget.addChild(new Widget());
+```
+
+... does not. Both will fail at run time, but the whole point of allowing
+covariant overrides is that developers should be allowed to opt in and take
+that risk.
+
+#### Tear-offs
+
+The *static* type of a tear-off is the type declared in the statically known
+receiver type:
+
+```dart
+var closure = new RadioGroup().addChild;
+```
+
+Here, `closure` has static type `(RadioButton) -> void`.
+
+```dart
+var closure = (new RadioGroup() as Widget).addChild;
+```
+
+Here, it has static type `(Widget) -> void`.
+
+Note that in both cases, we're tearing off the same actual method at runtime. We
+discuss below which runtime type such a tear-off should have.
+
+### Runtime semantics
+
+The runtime semantics of the language with covariant overrides is the same
+as the runtime semantics of the language without that feature, except that
+some type checks are not guaranteed to succeed based on static checks, so
+they must be performed at run time.
+
+In particular, when a method with a covariant parameter is invoked, it is not
+possible to guarantee based on the static type check at call sites that
+the actual argument will have the type which is declared for that parameter
+in the method that is actually invoked. A dynamic type check must then be
+performed to verify that the actual argument is null or has that type,
+and a `CastError` must be thrown if the check fails.
+
+In other words, the static checks enforce the original type, and the dynamic
+check enforces the desired type, and both checks are required because the
+desired type can be a proper subtype of the original type. Here is an example:
+
+```dart
+Widget widget = new RadioGroup();
+try {
+  widget.addChild(new Widget());
+} on CastError {
+  print("Caught!"); // Gets printed.
+}
+```
+
+In practice, a compiler may generate code such that every covariant parameter
+in each method implementation gets checked before the body of the method is
+executed. This is a correct implementation strategy because the dynamic check
+is performed with the desired type and it is performed for all invocations,
+no matter which original type the call site had.
+
+As an optimization, the dynamic check could be omitted in some cases, because
+it is guaranteed to succeed. For instance, we may know statically that the
+original and the desired type are the same, because the receiver's type is
+known exactly:
+
+```dart
+new RadioGroup().add(myRadioButton())
+```
+
+#### The runtime type of a tear-off
+
+For any given declaration *D* of a method `m`, the reified type
+obtained by tearing off `m` from a receiver whose dynamic type is a
+class `C` wherein *D* is the most specific declaration of `m` (that
+is, *D* has not been overridden by any other method declaration in
+`C`) can be computed as follows: Collect the set of all declarations
+of `m` in direct and indirect supertypes of `C`. For the reified
+return type, choose the greatest lower bound of all declared return
+types; for the reified parameter type of each covariant parameter,
+choose the least upper bound of all declared types for that parameter
+(including any declarations of that parameter which are not
+covariant).
+
+As a consequence, the reified type of a torn off method is at least as
+specific as every possible statically known type for that method, and
+that means that it is safe to assign the torn off method to a
+variable whose declared type is the statically known type of that
+method, no matter which supertype of the dynamic type of the receiver
+is the statically known receiver type.
+
+(Note that the computation of a "least upper bound" in Dart does not
+in fact yield a *least* upper bound, but it does yield some *upper
+bound*, which is sufficient to ensure that this safety property holds.)
+
+This rule is sufficiently complex to justify a rather lengthy
+discussion, which follows below.
+
+To give an example of the rule itself, consider `addChild` of
+`RadioGroup`. The set of declarations of `addChild` have the following
+types:
+
+* `(Widget) -> void` (From `Widget.addChild()`)
+* `(RadioButton) -> void` (From `RadioGroup.addChild()`)
+
+So the reified return type is `void`, and the argument type is the least upper
+bound of `Widget` and `RadioButton`: `Widget`. Thus the torn off method from
+`(new RadioGroup()).addChild` has reified type `(Widget) -> void`.
+
+To motivate this rule, we will consider some design options and their
+consequences. Consider the following tear-offs:
+
+```dart
+var closureRadio = new RadioGroup().addChild;
+var closureWidget = (new RadioGroup() as Widget).addChild;
+```
+
+Here, `closureRadio` has static type `(RadioButton) -> void`, and
+`closureWidget` has static type `(Widget) -> void`. However, they are both
+obtained by tearing off the same method from the exact same type of
+receiver at run time, so which of these types (or which type in
+general) do we *reify at runtime?*
+
+We could reify the type which is declared in the actual method which is torn
+off. (That is a specific method because method lookup is determined by the
+dynamic receiver type, and a tear-off embodies one specific receiver). In the
+example, the reified type would then be `(RadioButton) -> void`. Intuitively,
+this means that we will reify the "true" type of the method, based on its actual
+declaration.
+
+Or we could reify the statically known type, except that there are several
+possible statically known types when the method is inherited and overridden in
+several supertypes. In order to allow the torn off method to be passed around
+based on the statically known type, it should have the most specific type which
+this tear-off could ever have statically.
+
+To achieve is, we consider all the static types the receiver could
+have where the torn off method is statically known (in the example it
+would be `RadioGroup` and `Widget`, but not `Object` because
+`addChild()` is not inherited from there). In this set of classes,
+each declaration for the relevant method specifies a type for each
+covariant parameter. We may choose the least upper bound of all these
+types, or we may insist that there is a maximal type among them (such
+that all the others are subtypes of that type) and otherwise reject
+the method declaration as a compile-time error. In the example, this
+check succeeds and the resulting reified type is `(Widget) -> void`.
+
+With the first model (where we reify the "true" type `(RadioButton) ->
+void`), we get the property that the reified type is the most
+informative type there exists, but the tear-off fails to have the
+statically known type. This means that we may get a runtime exception
+by assigning a tear-off to a variable with the statically known type:
+
+```dart
+typedef void WidgetCallback(Widget widget);
+
+Widget widget = new RadioGroup();
+WidgetCallback callback = widget.addChild; // Statically OK, fails at run time.
+```
+
+This differs from the general situation. For instance, if `addChild` had been
+a getter then an initialization like:
+
+```dart
+WidgetCallback callback = widget.addChild;
+```
+
+would never fail
+with a type error, because the value returned by the getter is guaranteed to
+have the declared return type or be null. As a consequence, all tear-off
+expressions would have to be treated differently by compilers than other
+expressions, because they would have to generate the dynamic check.
+
+With the second model (where we aim for covering all statically known
+types and reify `(Widget) -> void`), it is possible that an invocation
+of the torn off closure fails, because the statically known
+requirement on the actual argument is less restrictive that the actual
+requirement at runtime. For instance, the actual torn off method would
+have a parameter type `RadioButton` even though the statically known
+parameter type is `Widget`. Here is an example:
+
+```dart
+typedef void WidgetCallback(Widget widget);
+
+Widget widget = new RadioGroup();
+WidgetCallback callback = widget.addChild; // Statically and dynamically OK.
+callback(new Widget()); // Statically OK, fails at run time.
+```
+
+As expected, both models are unsound. However, the second model exhibits a
+kind of unsoundness which is in line with the rest of the language, because
+it is a parameter passing operation that fails, and not an expression
+evaluation that yields a value which does not have the static type. This is
+also reflected in the fact that no dynamic checks must be generated at
+locations where such checks are otherwise avoided.
+
+So there are pros and cons to both approaches, but we have chosen to
+use the second model, yielding reified type `(Widget) -> void`.
+Reasons for this include the following:
+
+*   This choice lines up with the reified type you would get if you didn't have
+    this language feature and applied the pattern above manually:
+
+    ```dart
+    class RadioGroup extends Widget {
+      void addChild(Widget widget) {
+        var button = widget as RadioButton;
+        button.select();
+        super.addChild(button);
+      }
+    }
+    ```
+
+    Here, standard override rules are followed, and `RadioGroup.addChild` has
+    reified type `(Widget) -> void`.
+
+*   Polymorphic code that does implicit type tests won't spontaneously blow up
+    when encountering overridden methods with tighter types. Consider:
+
+    ```dart
+    typedef void TakesWidget(Widget widget);
+
+    grabClosures(List<Widget> widgets) {
+      var closures = <TakesWidget>[];
+      for (var widget in widgets) {
+        closures.add(widget.addChild);
+      }
+    }
+
+    grabClosures([
+      new Widget(),
+      new RadioGroup()
+    ]);
+    ```
+
+    The call to `List.add()` has to check the type of the added object at
+    runtime thanks to covariant generics. If the reified type of
+    `RadioGroup.addChild` had been `(RadioButton) -> void`, that check would fail.
+
+The main downside to reifying with the more special type is that you lose the
+ability to use an `is` check to detect which type of argument is *actually*
+required, you can just call it and hope that the dynamic check in the body
+succeeds. In practice, though, code we see using this pattern doesn't avoid
+those cast errors by using `is` checks, it avoids cast errors by managing how
+the objects collaborate with each other.
+
+## Questions
+
+### Why not always put `covariant` in the superclass?
+
+We could require each covariant parameter to be covariant everywhere, that is,
+we could require that every overridden declaration of that parameter either
+has the `covariant` modifier, or that it overrides another declaration which
+has it, directly or indirectly.
+
+There are no technical difficulties in implementing this approach, and it has
+the nice property that all call sites can be checked for type safety: If a
+given actual argument does not correspond to a formal parameter which is
+statically known to be covariant then that argument will not be passed to a
+covariant parameter at runtime. In other words, the desired type is a supertype
+of the original type (typically they are identical), and no runtime check
+failure is possible.
+
+The problem with this approach is that it requires the author of all the
+involved supertypes to foresee the need for covariance. Moreover, the safety
+property is more aggressive than other guarantees provided in Dart (for
+instance, an argument like `a` in `List<T>.add(a)` is always subject to a
+dynamic check because the list could have a type argument which is a proper
+subtype of `T`).
+
+So we made the choice to accept the dynamic checks, and in return allow
+developers to use covariant overrides even in cases where some of the supertype
+authors did not foresee the need.
+
+It should be noted, however, that it is *possible* to maintain a style where
+every covariant parameter is everywhere-covariant (that is, to put `covariant`
+in all supertypes), and it is possible to let a linter check that this style
+is used consistently. So developers may use this style, the language just
+doesn't enforce it.
+
+There are many intermediate forms where a given parameter is covariant
+in some supertypes but not all. This could mean that `covariant` is applied
+to a parameter in a library, because the design makes it useful to use
+covariant overrides for that parameter in subtypes and the library authors
+wish to make that known. Subtype authors would then automatically get the
+"permission" to tighten the corresponding parameter type, without an
+explicit `covariant` modifier. At the same time, it would not violate
+any rules if one of these parameters were overriding some additional
+declarations of the same method, even if the authors of those declarations
+were unaware of the need to use covariant overriding.
+
+### Why not allow all parameters to be tightened?
+
+Dart 1.0 allows any parameter in an overriding method declaration to have a
+tighter type than the one in the overridden method. We could certainly
+continue to allow this, and retain all the same safety properties in the
+semantics by inferring which parameters would be forced to have the
+`covariant` modifier, according to this proposal. There are several arguments
+in relation to this idea:
+
+*   We expect the situation where an overriding method is intended to have
+    a tightened parameter type to be rare, compared to the situation where
+    it is intended to have the same type (or even a supertype). This means
+    that an actual covariant override may be much more likely to be an
+    accident than an intended design choice. In that case it makes sense
+    to require the explicit opt-in that a modifier would provide.
+
+*   If a widely used class method is generalized to allow a looser type for
+    some parameter, third party implementations of that method in subtypes
+    could introduce covariance, silently and without changing the subtype
+    at all. This might cause invocations to fail at run time, even in
+    situations where the subtype could just as well have been changed to use
+    the new, looser parameter type, had the situation been detected.
+
+*   We have widespread feedback from users that they want greater confidence
+    in the static safety of their code. Allowing all parameters to silently
+    tighten their type shifts the balance in the direction of diminished
+    static safety, in return for added dynamic flexibility.
+
+*   Parameter covariance requires a runtime check, which has a run time
+    performance cost.
+
+*   Most other statically typed object-oriented languages do not allow this. It
+    is an error in Java, C#, C++, and others. Dart's type system strikes a
+    balance where certain constructs are allowed, even though they are not
+    type safe. But this balance should not be such that guarantees familiar to
+    users coming from those languages are violated in ways that are gratuitous
+    or error-prone.
+
+*   Finally, we are about to introduce a mechanism whereby the types of an
+    instance method declaration are inherited from overridden declarations, if
+    those types are omitted. With this mechanism in place, it will be a strong
+    signal in itself that a parameter type is present: This means that the
+    developer had the intention to specify something _new_, relative to the
+    overridden declarations of the same parameter. It is not unambiguous,
+    though, because it could be the case that the type is given explicitly
+    because there is no overridden method, or it could be that the type is
+    specified because it is changed contravariantly, or finally the type could
+    be specified explicitly simply because the source code is older than the
+    feature which allows it to be omitted, or because the organization
+    maintaining the code prefers a coding style where the types are always
+    explicit.
+
+Based on arguments like this, we decided that covariant overrides must be
+marked explicitly.
+
+### Why not `checked` or `unsafe`?
+
+Instead of "covariant", we could use "checked" to indicate that invocations
+passing actual arguments to this parameter will be subject to a runtime
+check. We decided not to do this, because it puts the focus on an action
+which is required by the type system to enforce a certain discipline on the
+program behavior at runtime, but the developers should be allowed to focus
+on what the program will do and how they may achieve that, not how it might
+fail.
+
+The word "covariant" may be esoteric, but if a developer knows the word or
+looks it up the meaning of this word directly addresses the functionality that
+this feature provides: It is possible to request a subtype for this parameter
+in an overriding version of the method.
+
+Similarly, the word "unsafe" puts the focus on the possible `CastError` at
+runtime, which is not the motivation for the developer to use this feature,
+it's a cost that they are willing to pay. Moreover, C#, Go, and Rust all use
+"unsafe" to refer to code that may violate soundness and memory safety entirely,
+e.g., using raw pointers or reinterpreting memory.
+
+What we're doing here isn't that risky. It stays within the soundness
+boundaries of the language, that is, it maintains heap soundness. The feature
+just requires a runtime check to do that, and this is a well-known situation
+in Dart.
+
+## Interactions with other language features
+
+This is yet another use of least upper bounds, which has traditionally been hard
+for users to understand in cases where the types are even a little bit complex,
+like generics. In practice, we expect most uses of this feature to only override
+a single chain of methods, in which case the least upper bound has no effect and
+the original type is just the most general parameter type in the chain.
+
+## Comparison to other languages
+
+**TODO**
+
+## Notes
+
+The feature (using a `@checked` metadata annotation rather than the `covariant`
+modifier) has already been implemented in strong mode, and is being used by
+Flutter. See here:
+
+https://github.com/dart-lang/sdk/commit/a4734d4b33f60776969b72ad475fea267c2091d5
+https://github.com/dart-lang/sdk/commit/70f6e16c97dc0f48d29deefdd7960cf3172b31a2
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 3a9d6b3..dcce078 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -1818,24 +1818,8 @@
 
   @override
   nd.AnalysisDriver addAnalysisDriver(Folder folder, AnalysisOptions options) {
-    SourceFactory sourceFactory;
-    AnalysisOptions analysisOptions;
-    {
-      ContextBuilder builder = createContextBuilder(folder, options);
-      AnalysisContext context = builder.buildContext(folder.path);
-      sourceFactory = context.sourceFactory;
-      analysisOptions = context.analysisOptions;
-      context.dispose();
-    }
-    nd.AnalysisDriver analysisDriver = new nd.AnalysisDriver(
-        analysisServer.analysisDriverScheduler,
-        analysisServer._analysisPerformanceLogger,
-        resourceProvider,
-        analysisServer.byteStore,
-        analysisServer.fileContentOverlay,
-        folder.path,
-        sourceFactory,
-        analysisOptions);
+    ContextBuilder builder = createContextBuilder(folder, options);
+    nd.AnalysisDriver analysisDriver = builder.buildDriver(folder.path);
     analysisDriver.status.listen((status) {
       // TODO(scheglov) send server status
     });
@@ -1973,6 +1957,10 @@
         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;
     return builder;
   }
 
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 4010ece..9b2dbb1 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
@@ -26,6 +26,9 @@
       return EMPTY_LIST;
     }
 
+    // TODO(scheglov) Not sure why we need this now.
+    await request.resolveImports();
+
     // Build list of suggestions
     var directive = node.getAncestor((parent) => parent is NamespaceDirective);
     if (directive is NamespaceDirective) {
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 c29be04..dc59c71 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1011,6 +1011,9 @@
       }
       staticModifier = _inStaticContext();
     }
+    if (targetClassElement.librarySource.isInSystemLibrary) {
+      return;
+    }
     utils.targetClassElement = targetClassElement;
     // prepare target ClassDeclaration
     AstNode targetTypeNode = getParsedClassElementNode(targetClassElement);
@@ -1144,6 +1147,9 @@
       }
       staticModifier = _inStaticContext();
     }
+    if (targetClassElement.librarySource.isInSystemLibrary) {
+      return;
+    }
     utils.targetClassElement = targetClassElement;
     // prepare target ClassDeclaration
     AstNode targetTypeNode = getParsedClassElementNode(targetClassElement);
@@ -1517,7 +1523,7 @@
         }
         // prepare LibraryElement
         LibraryElement libraryElement =
-            context.computeResult(librarySource, LIBRARY_ELEMENT1);
+            context.getResult(librarySource, LIBRARY_ELEMENT1);
         if (libraryElement == null) {
           continue;
         }
@@ -2014,6 +2020,9 @@
           return;
         }
         ClassElement targetClassElement = targetType.element as ClassElement;
+        if (targetClassElement.librarySource.isInSystemLibrary) {
+          return;
+        }
         targetElement = targetClassElement;
         // prepare target ClassDeclaration
         AstNode targetTypeNode = getParsedClassElementNode(targetClassElement);
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine_internal2.dart b/pkg/analysis_server/lib/src/services/search/search_engine_internal2.dart
index 6a09cd9..e14a6ac 100644
--- a/pkg/analysis_server/lib/src/services/search/search_engine_internal2.dart
+++ b/pkg/analysis_server/lib/src/services/search/search_engine_internal2.dart
@@ -49,8 +49,13 @@
 
   @override
   Future<List<SearchMatch>> searchMemberReferences(String name) async {
-    // TODO(scheglov) implement
-    return [];
+    List<SearchResult> allResults = [];
+    for (AnalysisDriver driver in _drivers) {
+      List<SearchResult> results =
+          await driver.search.unresolvedMemberReferences(name);
+      allResults.addAll(results);
+    }
+    return allResults.map(_SearchMatch.forSearchResult).toList();
   }
 
   @override
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index b0750f2..d243352 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -12,17 +12,17 @@
 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/source/package_map_resolver.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/sdk/sdk.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 'mock_sdk.dart';
+
 /**
  * Finds an [Element] with the given [name].
  */
@@ -46,13 +46,8 @@
 typedef void _ElementVisitorFunction(Element element);
 
 class AbstractContextTest {
-  static final DartSdk SDK = new FolderBasedDartSdk(
-      PhysicalResourceProvider.INSTANCE,
-      FolderBasedDartSdk.defaultSdkDirectory(PhysicalResourceProvider.INSTANCE))
-    ..useSummary = true;
-  static final UriResolver SDK_RESOLVER = new DartUriResolver(SDK);
-
   MemoryResourceProvider provider;
+  DartSdk sdk;
   Map<String, List<Folder>> packageMap;
   UriResolver resourceResolver;
 
@@ -139,12 +134,13 @@
   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([SDK_RESOLVER, packageResolver, resourceResolver]);
+    SourceFactory sourceFactory = new SourceFactory(
+        [new DartUriResolver(sdk), packageResolver, resourceResolver]);
     if (enableNewAnalysisDriver) {
       PerformanceLog log = new PerformanceLog(_logBuffer);
       AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
diff --git a/pkg/analysis_server/test/context_manager_driver_test.dart b/pkg/analysis_server/test/context_manager_driver_test.dart
index c48c98c..4930908 100644
--- a/pkg/analysis_server/test/context_manager_driver_test.dart
+++ b/pkg/analysis_server/test/context_manager_driver_test.dart
@@ -31,21 +31,6 @@
     //return super.test_embedder_added();
     fail('NoSuchMethodError');
   }
-
-  @failingTest
-  test_embedder_packagespec() async {
-    // NoSuchMethodError: The getter 'apiSignature' was called on null.
-    // Receiver: null
-    // Tried calling: apiSignature
-    // dart:core                                                          Object.noSuchMethod
-    // package:analyzer/src/dart/analysis/driver.dart 248:20              AnalysisDriver.AnalysisDriver
-    // test/context_manager_test.dart 2698:25                             TestContextManagerCallbacks.addAnalysisDriver
-    // package:analysis_server/src/context_manager.dart 1186:39           ContextManagerImpl._createContext
-    // package:analysis_server/src/context_manager.dart 1247:16           ContextManagerImpl._createContexts
-    // package:analysis_server/src/context_manager.dart 886:9             ContextManagerImpl.setRoots
-    // test/context_manager_test.dart 154:13                              AbstractContextManagerTest.test_embedder_packagespec.<async>
-    return super.test_embedder_packagespec();
-  }
 }
 
 @reflectiveTest
diff --git a/pkg/analysis_server/test/domain_diagnostic_test.dart b/pkg/analysis_server/test/domain_diagnostic_test.dart
index fcaf755..3bd5429 100644
--- a/pkg/analysis_server/test/domain_diagnostic_test.dart
+++ b/pkg/analysis_server/test/domain_diagnostic_test.dart
@@ -46,13 +46,7 @@
     expect(context.name, '/project');
     expect(context.explicitFileCount, 1); /* test.dart */
 
-    if (enableNewAnalysisDriver) {
-      // dart:core (although it should not be here)
-      expect(context.implicitFileCount, 1);
-    } else {
-      // dart:core dart:async dart:math dart:_internal
-      expect(context.implicitFileCount, 4);
-    }
+    expect(context.implicitFileCount, 4);
 
     expect(context.workItemQueueLength, isNotNull);
   }
diff --git a/pkg/analysis_server/test/edit/sort_members_test.dart b/pkg/analysis_server/test/edit/sort_members_test.dart
index b246d82..b5d67f6 100644
--- a/pkg/analysis_server/test/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/edit/sort_members_test.dart
@@ -178,6 +178,60 @@
 ''');
   }
 
+  @failingTest
+  test_OK_genericFunctionTypeInComments() async {
+    addFile(
+        projectPath + '/analysis_options.yaml',
+        '''
+analyzer:
+  strong-mode: true
+''');
+    addTestFile('''
+class C {
+  void caller() {
+    Super s = new Super();
+    takesSub(s); // <- No warning
+  }
+
+  void takesSub(Sub s) {}
+}
+
+class Sub extends Super {}
+
+class Super {}
+
+typedef dynamic Func(String x, String y);
+
+Function/*=F*/ allowInterop/*<F extends Function>*/(Function/*=F*/ f) => null;
+
+Func bar(Func f) {
+  return allowInterop(f);
+}
+''');
+    return _assertSorted('''
+Function/*=F*/ allowInterop/*<F extends Function>*/(Function/*=F*/ f) => null;
+
+Func bar(Func f) {
+  return allowInterop(f);
+}
+
+typedef dynamic Func(String x, String y);
+
+class C {
+  void caller() {
+    Super s = new Super();
+    takesSub(s); // <- No warning
+  }
+
+  void takesSub(Sub s) {}
+}
+
+class Sub extends Super {}
+
+class Super {}
+''');
+  }
+
   test_OK_unitMembers_class() async {
     addTestFile('''
 class C {}
diff --git a/pkg/analysis_server/test/mock_sdk.dart b/pkg/analysis_server/test/mock_sdk.dart
index b188e75..ab40d91 100644
--- a/pkg/analysis_server/test/mock_sdk.dart
+++ b/pkg/analysis_server/test/mock_sdk.dart
@@ -24,9 +24,12 @@
 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 {}
@@ -130,13 +133,24 @@
   Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e));
 }
 
-abstract class List<E> implements Iterable<E> {
-  void add(E value);
+class List<E> implements Iterable<E> {
+  List();
+  void add(E value) {}
   void addAll(Iterable<E> iterable) {}
-  E operator [](int index);
-  void operator []=(int index, E value);
+  E operator [](int index) => null;
+  void operator []=(int index, E value) {}
   Iterator<E> get iterator => null;
-  void clear();
+  void clear() {}
+
+  bool get isEmpty => false;
+  E get first => null;
+  E get last => null;
+
+  Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e)) => null;
+
+  /*=R*/ fold/*<R>*/(/*=R*/ initialValue,
+      /*=R*/ combine(/*=R*/ previousValue, E element)) => null;
+
 }
 
 abstract class Map<K, V> extends Object {
@@ -208,8 +222,8 @@
 const double E = 2.718281828459045;
 const double PI = 3.1415926535897932;
 const double LN10 =  2.302585092994046;
-num min(num a, num b) => 0;
-num max(num a, num b) => 0;
+T min<T extends num>(T a, T b) => null;
+T max<T extends num>(T a, T b) => null;
 external double cos(num x);
 external num pow(num x, num exponent);
 external double sin(num x);
@@ -320,28 +334,26 @@
 
   @override
   Source fromFileUri(Uri uri) {
-    String filePath = uri.path;
-    String libPath = '/lib';
-    if (!filePath.startsWith("$libPath/")) {
-      return null;
-    }
-    for (SdkLibrary library in LIBRARIES) {
-      String libraryPath = library.path;
-      if (filePath.replaceAll('\\', '/') == libraryPath) {
+    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(uri.path);
+          resource.File file = provider.getResource(filePath);
           Uri dartUri = Uri.parse(library.shortName);
           return file.createSource(dartUri);
         } catch (exception) {
           return null;
         }
       }
-      if (filePath.startsWith("$libraryPath/")) {
-        String pathInLibrary = filePath.substring(libraryPath.length + 1);
-        String path = '${library.shortName}/$pathInLibrary';
+      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(uri.path);
-          Uri dartUri = new Uri(scheme: 'dart', path: path);
+          resource.File file = provider.getResource(filePath);
+          Uri dartUri = Uri.parse(uriStr);
           return file.createSource(dartUri);
         } catch (exception) {
           return null;
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 954432c..7c91fe8 100644
--- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
@@ -15,7 +15,6 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../abstract_context.dart';
 import 'completion_contributor_util.dart';
 
 main() {
@@ -656,7 +655,7 @@
     assertNotSuggested('G');
     //assertSuggestClass('H', COMPLETION_RELEVANCE_LOW);
     assertSuggestClass('Object');
-    assertSuggestFunction('min', 'T');
+//    assertSuggestFunction('min', 'T');
     //assertSuggestFunction(
     //    'max',
     //    'num',
@@ -3500,7 +3499,7 @@
     // Create a 2nd context with source
     var context2 = AnalysisEngine.instance.createAnalysisContext();
     context2.sourceFactory =
-        new SourceFactory([AbstractContextTest.SDK_RESOLVER, resourceResolver]);
+        new SourceFactory([new DartUriResolver(sdk), resourceResolver]);
     String content2 = 'class ClassFromAnotherContext { }';
     Source source2 =
         provider.newFile('/context2/foo.dart', content2).createSource();
diff --git a/pkg/analysis_server/test/services/completion/dart/optype_test.dart b/pkg/analysis_server/test/services/completion/dart/optype_test.dart
index 5c4a758..17cf6c4 100644
--- a/pkg/analysis_server/test/services/completion/dart/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/optype_test.dart
@@ -8,13 +8,15 @@
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
 import 'package:analysis_server/src/services/completion/dart/optype.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/file_system/memory_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:plugin/manager.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../abstract_context.dart';
+import '../../../mock_sdk.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -27,6 +29,9 @@
   OpType visitor;
 
   void addTestSource(String content, {bool resolved: false}) {
+    MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
+    DartSdk sdk = new MockSdk(resourceProvider: resourceProvider);
+
     int offset = content.indexOf('^');
     expect(offset, isNot(equals(-1)), reason: 'missing ^');
     int nextOffset = content.indexOf('^', offset + 1);
@@ -34,8 +39,7 @@
     content = content.substring(0, offset) + content.substring(offset + 1);
     Source source = new _TestSource('/completionTest.dart');
     AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
-    context.sourceFactory =
-        new SourceFactory([AbstractContextTest.SDK_RESOLVER]);
+    context.sourceFactory = new SourceFactory([new DartUriResolver(sdk)]);
     context.setContents(source, content);
     CompilationUnit unit = resolved
         ? context.resolveCompilationUnit2(source, source)
@@ -85,11 +89,6 @@
     processRequiredPlugins();
   }
 
-  test_Block_final_final2() {
-    addTestSource('main() {final S^ final S x;}');
-    assertOpType(typeNames: true);
-  }
-
   test_Annotation() {
     // SimpleIdentifier  Annotation  MethodDeclaration  ClassDeclaration
     addTestSource('class C { @A^ }');
@@ -330,6 +329,11 @@
     assertOpType(typeNames: true);
   }
 
+  test_Block_final_final2() {
+    addTestSource('main() {final S^ final S x;}');
+    assertOpType(typeNames: true);
+  }
+
   test_Block_identifier_partial() {
     addTestSource('class X {a() {var f; {var x;} D^ var r;} void b() { }}');
     assertOpType(returnValue: true, typeNames: true, voidReturn: true);
@@ -1567,9 +1571,6 @@
   bool get isInSystemLibrary => false;
 
   @override
-  Source get librarySource => null;
-
-  @override
   String get shortName => fullName;
 
   @override
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 a2d9778..fa7529f 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
@@ -238,7 +238,7 @@
 import "dart:async" as async;
 void main() {async.Future.^.w()}''');
     await computeSuggestions();
-    assertSuggestMethod('wait', 'Future', 'Future<List<T>>');
+    assertSuggestMethod('wait', 'Future', 'Future<dynamic>');
   }
 
   test_PrefixedIdentifier_class_const() async {
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 753c685..2f0e0bc 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -24,7 +24,6 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../abstract_context.dart';
 import '../../abstract_single_unit.dart';
 
 main() {
@@ -186,7 +185,7 @@
       'my_pkg': [myPkgFolder]
     });
     SourceFactory sourceFactory = new SourceFactory(
-        [AbstractContextTest.SDK_RESOLVER, pkgResolver, resourceResolver]);
+        [new DartUriResolver(sdk), pkgResolver, resourceResolver]);
     if (enableNewAnalysisDriver) {
       driver.configure(sourceFactory: sourceFactory);
     } else {
@@ -1871,7 +1870,7 @@
       'my': <Folder>[provider.getResource('/my/lib')],
     });
     SourceFactory sourceFactory = new SourceFactory(
-        [AbstractContextTest.SDK_RESOLVER, pkgResolver, resourceResolver]);
+        [new DartUriResolver(sdk), pkgResolver, resourceResolver]);
     if (enableNewAnalysisDriver) {
       driver.configure(sourceFactory: sourceFactory);
       testUnit = (await driver.getResult(testFile)).unit;
@@ -4287,12 +4286,8 @@
     _assertLinkedGroup(
         change.linkedEditGroups[2],
         ['List<int> items) {'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE, [
-          'List<int>',
-          'EfficientLengthIterable<int>',
-          'Iterable<int>',
-          'Object'
-        ]));
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['List<int>', 'Iterable<int>', 'Object']));
   }
 
   test_undefinedFunction_create_importType() async {
@@ -4931,7 +4926,7 @@
         change.linkedEditGroups[index++],
         ['String s'],
         expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['String', 'Object', 'Comparable<String>', 'Pattern']));
+            ['String', 'Object', 'Comparable<String>']));
     _assertLinkedGroup(change.linkedEditGroups[index++], ['s)']);
   }
 
@@ -4975,7 +4970,7 @@
         change.linkedEditGroups[index++],
         ['String ccc'],
         expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['String', 'Object', 'Comparable<String>', 'Pattern']));
+            ['String', 'Object', 'Comparable<String>']));
   }
 
   test_undefinedMethod_createUnqualified_returnType() async {
@@ -5344,6 +5339,67 @@
 class FixProcessorTest_Driver extends FixProcessorTest {
   @override
   bool get enableNewAnalysisDriver => true;
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_AsExpression() {
+    return super.test_importLibrarySdk_withClass_AsExpression();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_invocationTarget() {
+    return super.test_importLibrarySdk_withClass_invocationTarget();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_IsExpression() {
+    return super.test_importLibrarySdk_withClass_IsExpression();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_itemOfList() {
+    return super.test_importLibrarySdk_withClass_itemOfList();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_itemOfList_inAnnotation() {
+    return super.test_importLibrarySdk_withClass_itemOfList_inAnnotation();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_typeAnnotation() {
+    return super.test_importLibrarySdk_withClass_typeAnnotation();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_typeAnnotation_PrefixedIdentifier() {
+    return super
+        .test_importLibrarySdk_withClass_typeAnnotation_PrefixedIdentifier();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withClass_typeArgument() {
+    return super.test_importLibrarySdk_withClass_typeArgument();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withTopLevelVariable() {
+    return super.test_importLibrarySdk_withTopLevelVariable();
+  }
+
+  @failingTest
+  @override
+  test_importLibrarySdk_withTopLevelVariable_annotation() {
+    return super.test_importLibrarySdk_withTopLevelVariable_annotation();
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart b/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart
index 0b2be14..a854280 100644
--- a/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart
+++ b/pkg/analysis_server/test/services/dependencies/reachable_source_collector_test.dart
@@ -44,28 +44,37 @@
     Source lib3 = addSource('/lib3.dart', 'import "lib4.dart";');
     addSource('/lib4.dart', 'import "lib3.dart";');
 
-    {
-      Map<String, List<String>> imports = importsFor(lib1);
-      expect(imports.keys, contains('file:///lib1.dart'));
-      expect(imports.keys, contains('file:///lib2.dart'));
-      expect(imports.keys, contains('dart:core'));
-      expect(imports.keys, contains('dart:html'));
-      expect(imports.keys, contains('dart:math'));
-      expect(imports.keys, isNot(contains('file:///lib3.dart')));
-      expect(imports['file:///lib1.dart'],
-          unorderedEquals(['dart:core', 'dart:html', 'file:///lib2.dart']));
-    }
+    Map<String, List<String>> imports = importsFor(lib1);
+
+    // Verify keys.
+    expect(
+        imports.keys,
+        unorderedEquals([
+          'dart:_internal',
+          'dart:async',
+          'dart:core',
+          'dart:html',
+          'dart:math',
+          'file:///lib1.dart',
+          'file:///lib2.dart',
+        ]));
+    // Values.
+    expect(imports['file:///lib1.dart'],
+        unorderedEquals(['dart:core', 'dart:html', 'file:///lib2.dart']));
 
     // Check transitivity.
     expect(importsFor(lib2).keys, contains('dart:html'));
 
     // Cycles should be OK.
-    {
-      Map<String, List<String>> imports = importsFor(lib3);
-      expect(imports.keys, contains('file:///lib3.dart'));
-      expect(imports.keys, contains('file:///lib4.dart'));
-      expect(imports.keys, contains('dart:core'));
-      expect(imports.keys, contains('dart:math'));
-    }
+    expect(
+        importsFor(lib3).keys,
+        unorderedEquals([
+          'dart:_internal',
+          'dart:async',
+          'dart:core',
+          'dart:math',
+          'file:///lib3.dart',
+          'file:///lib4.dart'
+        ]));
   }
 }
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 c0cecec..a421d21 100644
--- a/pkg/analysis_server/test/services/refactoring/move_file_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
@@ -13,7 +13,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../abstract_context.dart';
 import 'abstract_refactoring.dart';
 
 main() {
@@ -114,7 +113,7 @@
       'my_pkg': <Folder>[provider.getResource('/packages/my_pkg/lib')]
     };
     context.sourceFactory = new SourceFactory([
-      AbstractContextTest.SDK_RESOLVER,
+      new DartUriResolver(sdk),
       new PackageMapUriResolver(provider, packageMap),
       resourceResolver
     ]);
@@ -241,7 +240,7 @@
 ''');
     // configure Uri resolves
     context.sourceFactory = new SourceFactory([
-      AbstractContextTest.SDK_RESOLVER,
+      new DartUriResolver(sdk),
       new PackageMapUriResolver(provider, <String, List<Folder>>{
         'testName': <Folder>[provider.getResource('/testName/lib')]
       }),
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 8596dc3..3997aee 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
@@ -924,22 +924,4 @@
   test_checkFinalConditions_shadowed_byLocalVariable_inSubClass() {
     return super.test_checkFinalConditions_shadowed_byLocalVariable_inSubClass();
   }
-
-  @failingTest
-  @override
-  test_createChange_MethodElement_potential() {
-    return super.test_createChange_MethodElement_potential();
-  }
-
-  @failingTest
-  @override
-  test_createChange_MethodElement_potential_inPubCache() {
-    return super.test_createChange_MethodElement_potential_inPubCache();
-  }
-
-  @failingTest
-  @override
-  test_createChange_MethodElement_potential_private_otherLibrary() {
-    return super.test_createChange_MethodElement_potential_private_otherLibrary();
-  }
 }
diff --git a/pkg/analysis_server/test/services/search/search_engine2_test.dart b/pkg/analysis_server/test/services/search/search_engine2_test.dart
index e4ebc37..572790e 100644
--- a/pkg/analysis_server/test/services/search/search_engine2_test.dart
+++ b/pkg/analysis_server/test/services/search/search_engine2_test.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -27,9 +28,8 @@
 
 @reflectiveTest
 class SearchEngineImpl2Test {
-  static final MockSdk sdk = new MockSdk();
-
   final MemoryResourceProvider provider = new MemoryResourceProvider();
+  DartSdk sdk;
   final ByteStore byteStore = new MemoryByteStore();
   final FileContentOverlay contentOverlay = new FileContentOverlay();
 
@@ -39,6 +39,7 @@
   AnalysisDriverScheduler scheduler;
 
   void setUp() {
+    sdk = new MockSdk(resourceProvider: provider);
     logger = new PerformanceLog(logBuffer);
     scheduler = new AnalysisDriverScheduler(logger);
     scheduler.start();
@@ -154,6 +155,49 @@
     assertHasElement('test', codeB.indexOf('test() {} // 2'));
   }
 
+  test_searchMemberReferences() async {
+    var a = _p('/test/a.dart');
+    var b = _p('/test/b.dart');
+
+    provider.newFile(
+        a,
+        '''
+class A {
+  int test;
+}
+foo(p) {
+  p.test;
+}
+''');
+    provider.newFile(
+        b,
+        '''
+import 'a.dart';
+bar(p) {
+  p.test = 1;
+}
+''');
+
+    var driver1 = _newDriver();
+    var driver2 = _newDriver();
+
+    driver1.addFile(a);
+    driver2.addFile(b);
+
+    var searchEngine = new SearchEngineImpl2([driver1, driver2]);
+    List<SearchMatch> matches =
+        await searchEngine.searchMemberReferences('test');
+    expect(matches, hasLength(2));
+    expect(
+        matches,
+        contains(predicate((SearchMatch m) =>
+            m.element.name == 'foo' || m.kind == MatchKind.READ)));
+    expect(
+        matches,
+        contains(predicate((SearchMatch m) =>
+            m.element.name == 'bar' || m.kind == MatchKind.WRITE)));
+  }
+
   test_searchReferences() async {
     var a = _p('/test/a.dart');
     var b = _p('/test/b.dart');
@@ -219,7 +263,8 @@
     var searchEngine = new SearchEngineImpl2([driver1, driver2]);
     List<SearchMatch> matches =
         await searchEngine.searchTopLevelDeclarations('.*');
-    expect(matches, hasLength(4));
+    expect(
+        matches.where((match) => !match.libraryElement.isInSdk), hasLength(4));
 
     void assertHasElement(String name) {
       expect(
diff --git a/pkg/analyzer/lib/context/declared_variables.dart b/pkg/analyzer/lib/context/declared_variables.dart
index 50c47dd..5f6d6f1 100644
--- a/pkg/analyzer/lib/context/declared_variables.dart
+++ b/pkg/analyzer/lib/context/declared_variables.dart
@@ -28,6 +28,13 @@
   Iterable<String> get variableNames => _declaredVariables.keys;
 
   /**
+   * Add all variables of [other] to this object.
+   */
+  void addAll(DeclaredVariables other) {
+    _declaredVariables.addAll(other._declaredVariables);
+  }
+
+  /**
    * Define a variable with the given [name] to have the given [value].
    */
   void define(String name, String value) {
diff --git a/pkg/analyzer/lib/dart/element/type.dart b/pkg/analyzer/lib/dart/element/type.dart
index fe07765..4f0729c 100644
--- a/pkg/analyzer/lib/dart/element/type.dart
+++ b/pkg/analyzer/lib/dart/element/type.dart
@@ -64,6 +64,12 @@
   bool get isDartAsyncFuture;
 
   /**
+   * Return `true` if this type represents the type 'FutureOr<T>' defined in the
+   * dart:async library.
+   */
+  bool get isDartAsyncFutureOr;
+
+  /**
    * Return `true` if this type represents the type 'Function' defined in the
    * dart:core library.
    */
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 43d6bd1..1cabe11 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -149,6 +149,7 @@
   CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST,
   CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP,
   CompileTimeErrorCode.INVALID_URI,
+  CompileTimeErrorCode.INVALID_USE_OF_COVARIANT,
   CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE,
   CompileTimeErrorCode.LABEL_UNDEFINED,
   CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME,
@@ -232,6 +233,9 @@
   HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH,
   HintCode.DEAD_CODE_ON_CATCH_SUBTYPE,
   HintCode.DEPRECATED_MEMBER_USE,
+  HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION,
+  HintCode.DEPRECATED_EXTENDS_FUNCTION,
+  HintCode.DEPRECATED_MIXIN_FUNCTION,
   HintCode.DIVISION_OPTIMIZATION,
   HintCode.DUPLICATE_IMPORT,
   HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
@@ -296,6 +300,7 @@
   ParserErrorCode.CLASS_IN_CLASS,
   ParserErrorCode.COLON_IN_PLACE_OF_IN,
   ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE,
+  ParserErrorCode.CONST_AND_COVARIANT,
   ParserErrorCode.CONST_AND_FINAL,
   ParserErrorCode.CONST_AND_VAR,
   ParserErrorCode.CONST_CLASS,
@@ -306,6 +311,11 @@
   ParserErrorCode.CONST_TYPEDEF,
   ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP,
   ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE,
+  ParserErrorCode.COVARIANT_AFTER_VAR,
+  ParserErrorCode.COVARIANT_AND_STATIC,
+  ParserErrorCode.COVARIANT_CONSTRUCTOR,
+  ParserErrorCode.COVARIANT_MEMBER,
+  ParserErrorCode.COVARIANT_TOP_LEVEL_DECLARATION,
   ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
   ParserErrorCode.DIRECTIVE_AFTER_DECLARATION,
   ParserErrorCode.DUPLICATED_MODIFIER,
@@ -337,6 +347,7 @@
   ParserErrorCode.FACTORY_WITHOUT_BODY,
   ParserErrorCode.FACTORY_WITH_INITIALIZERS,
   ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
+  ParserErrorCode.FINAL_AND_COVARIANT,
   ParserErrorCode.FINAL_AND_VAR,
   ParserErrorCode.FINAL_CLASS,
   ParserErrorCode.FINAL_CONSTRUCTOR,
@@ -618,7 +629,9 @@
   StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_MIXIN,
   StrongModeCode.INVALID_PARAMETER_DECLARATION,
   StrongModeCode.INVALID_SUPER_INVOCATION,
+  StrongModeCode.NO_DEFAULT_BOUNDS,
   StrongModeCode.NON_GROUND_TYPE_CHECK_INFO,
+  StrongModeCode.NOT_INSTANTIATED_BOUND,
   StrongModeCode.UNSAFE_BLOCK_CLOSURE_INFERENCE,
   TodoCode.TODO,
 ];
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 3404edc..1d8d0f8 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -84,6 +84,9 @@
   /// Create an error processor that ignores the given error by [code].
   factory ErrorProcessor.ignore(String code) => new ErrorProcessor(code);
 
+  /// The string that unique describes the processor.
+  String get description => '$code -> ${severity?.name}';
+
   /// Check if this processor applies to the given [error].
   bool appliesTo(AnalysisError error) => code == error.errorCode.name;
 
@@ -117,6 +120,9 @@
   String get code => throw new UnsupportedError(
       "_StrongModeTypeErrorProcessor is not specific to an error code.");
 
+  @override
+  String get description => 'allStrongWarnings -> ERROR';
+
   /// In strong mode, type warnings are upgraded to errors.
   ErrorSeverity get severity => ErrorSeverity.ERROR;
 
diff --git a/pkg/analyzer/lib/src/codegen/tools.dart b/pkg/analyzer/lib/src/codegen/tools.dart
index cccab10..da71812 100644
--- a/pkg/analyzer/lib/src/codegen/tools.dart
+++ b/pkg/analyzer/lib/src/codegen/tools.dart
@@ -155,12 +155,12 @@
     });
   }
 
-  void outputHeader({bool javaStyle: false}) {
+  void outputHeader({bool javaStyle: false, String year = null}) {
     String header;
     if (codeGeneratorSettings.languageName == 'java') {
       header = '''
 /*
- * Copyright (c) 2015, the Dart project authors.
+ * Copyright (c) ${year ?? '2015'}, the Dart project authors.
  *
  * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
@@ -177,7 +177,7 @@
  */''';
     } else if (codeGeneratorSettings.languageName == 'python') {
       header = '''
-# Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+# Copyright (c) ${year ?? '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.
 #
@@ -187,7 +187,7 @@
 ''';
     } else {
       header = '''
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) ${year ?? '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/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index aad53cf..58301b7 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -14,9 +14,14 @@
 import 'package:analyzer/source/package_map_resolver.dart';
 import 'package:analyzer/src/command_line/arguments.dart'
     show applyAnalysisOptionFlags;
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart'
+    show AnalysisDriver, AnalysisDriverScheduler, PerformanceLog;
+import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/sdk/sdk.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/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
@@ -66,7 +71,8 @@
   final DartSdkManager sdkManager;
 
   /**
-   * The cache containing the contents of overlaid files.
+   * The cache containing the contents of overlaid files. If this builder will
+   * be used to build analysis drivers, set the [fileContentOverlay] instead.
    */
   final ContentCache contentCache;
 
@@ -88,6 +94,28 @@
   ResolverProvider fileResolverProvider;
 
   /**
+   * The scheduler used by any analysis drivers created through this interface.
+   */
+  AnalysisDriverScheduler analysisDriverScheduler;
+
+  /**
+   * The performance log used by any analysis drivers created through this
+   * interface.
+   */
+  PerformanceLog performanceLog;
+
+  /**
+   * The byte store used by any analysis drivers created through this interface.
+   */
+  ByteStore byteStore;
+
+  /**
+   * The file content overlay used by analysis drivers. If this builder will be
+   * used to build analysis contexts, set the [contentCache] instead.
+   */
+  FileContentOverlay fileContentOverlay;
+
+  /**
    * Initialize a newly created builder to be ready to build a context rooted in
    * the directory with the given [rootDirectoryPath].
    */
@@ -116,6 +144,26 @@
   }
 
   /**
+   * Return an analysis driver that is configured correctly to analyze code in
+   * the directory with the given [path].
+   */
+  AnalysisDriver buildDriver(String path) {
+    AnalysisOptions options = getAnalysisOptions(path);
+    //_processAnalysisOptions(context, optionMap);
+    AnalysisDriver driver = new AnalysisDriver(
+        analysisDriverScheduler,
+        performanceLog,
+        resourceProvider,
+        byteStore,
+        fileContentOverlay,
+        path,
+        createSourceFactory(path, options),
+        options);
+    declareVariablesInDriver(driver);
+    return driver;
+  }
+
+  /**
    * Configure the context to make use of summaries.
    */
   void configureSummaries(InternalAnalysisContext context) {
@@ -208,6 +256,17 @@
       return new SourceFactory(resolvers, null, resourceProvider);
     }
 
+    GnWorkspace gnWorkspace = GnWorkspace.find(resourceProvider, rootPath);
+    if (gnWorkspace != null) {
+      DartSdk sdk = findSdk(gnWorkspace.packageMap, options);
+      List<UriResolver> resolvers = <UriResolver>[
+        new DartUriResolver(sdk),
+        new GnPackageUriResolver(gnWorkspace),
+        new GnFileUriResolver(gnWorkspace)
+      ];
+      return new SourceFactory(resolvers, null, resourceProvider);
+    }
+
     Packages packages = createPackageMap(rootPath);
     Map<String, List<Folder>> packageMap = convertPackagesToMap(packages);
     List<UriResolver> resolvers = <UriResolver>[
@@ -233,6 +292,20 @@
   }
 
   /**
+   * Add any [declaredVariables] to the list of declared variables used by the
+   * given analysis [driver].
+   */
+  void declareVariablesInDriver(AnalysisDriver driver) {
+    Map<String, String> variables = builderOptions.declaredVariables;
+    if (variables != null && variables.isNotEmpty) {
+      DeclaredVariables contextVariables = driver.declaredVariables;
+      variables.forEach((String variableName, String value) {
+        contextVariables.define(variableName, value);
+      });
+    }
+  }
+
+  /**
    * Finds a package resolution strategy for the directory at the given absolute
    * [path].
    *
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 52a64b7..5c20e0b 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -204,6 +204,15 @@
    */
   List<AnalysisListener> _listeners = new List<AnalysisListener>();
 
+  /**
+   * Determines whether this context should attempt to make use of the global
+   * SDK cache partition. Note that if this context is responsible for
+   * resynthesizing the SDK element model, this flag should be set to `false`,
+   * so that resynthesized elements belonging to this context won't leak into
+   * the global SDK cache partition.
+   */
+  bool useSdkCachePartition = true;
+
   @override
   ResultProvider resultProvider;
 
@@ -739,6 +748,9 @@
       if (factory == null) {
         return new AnalysisCache(<CachePartition>[_privatePartition]);
       }
+      if (!useSdkCachePartition) {
+        return new AnalysisCache(<CachePartition>[_privatePartition]);
+      }
       DartSdk sdk = factory.dartSdk;
       if (sdk == null) {
         return new AnalysisCache(<CachePartition>[_privatePartition]);
diff --git a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
index 3f3f5db..2f151f9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
@@ -98,3 +98,14 @@
     }
   }
 }
+
+/**
+ * [ByteStore] which does not store any data.
+ */
+class NullByteStore implements ByteStore {
+  @override
+  List<int> get(String key) => null;
+
+  @override
+  void put(String key, List<int> bytes) {}
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 0d16a92..18c8124 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -6,6 +6,7 @@
 import 'dart:collection';
 import 'dart:typed_data';
 
+import 'package:analyzer/context/declared_variables.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement;
 import 'package:analyzer/error/error.dart';
@@ -73,7 +74,7 @@
   /**
    * The version of data format, should be incremented on every format change.
    */
-  static const int DATA_VERSION = 11;
+  static const int DATA_VERSION = 13;
 
   /**
    * The name of the driver, e.g. the name of the folder.
@@ -115,12 +116,22 @@
   AnalysisOptions _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.
    */
   SourceFactory _sourceFactory;
 
   /**
+   * The declared environment variables.
+   */
+  final DeclaredVariables declaredVariables = new DeclaredVariables();
+
+  /**
    * The salt to mix into all hashes used as keys for serialized data.
    */
   final Uint32List _salt = new Uint32List(1 + AnalysisOptions.signatureLength);
@@ -131,12 +142,6 @@
   FileSystemState _fsState;
 
   /**
-   * The combined unlinked and linked package for the SDK, extracted from
-   * the given [sourceFactory].
-   */
-  PackageBundle _sdkBundle;
-
-  /**
    * The set of added files.
    */
   final _addedFiles = new LinkedHashSet<String>();
@@ -241,26 +246,14 @@
       this._contentOverlay,
       this.name,
       SourceFactory sourceFactory,
-      this._analysisOptions)
-      : _sourceFactory = sourceFactory.clone() {
+      this._analysisOptions,
+      {PackageBundle sdkBundle})
+      : _sourceFactory = sourceFactory.clone(),
+        _sdkBundle = sdkBundle {
     _testView = new AnalysisDriverTestView(this);
     _fillSalt();
-    _sdkBundle = sourceFactory.dartSdk.getLinkedBundle();
-    if (_sdkBundle == null) {
-      Type sdkType = sourceFactory.dartSdk.runtimeType;
-      String message = 'DartSdk ($sdkType) for $name does not have summary.';
-      AnalysisEngine.instance.logger.logError(message);
-      throw new StateError(message);
-    }
-    _fsState = new FileSystemState(
-        _logger,
-        _byteStore,
-        _contentOverlay,
-        _resourceProvider,
-        sourceFactory,
-        _analysisOptions,
-        _salt,
-        _sdkBundle.apiSignature);
+    _fsState = new FileSystemState(_logger, _byteStore, _contentOverlay,
+        _resourceProvider, sourceFactory, _analysisOptions, _salt);
     _scheduler._add(this);
     _search = new Search(this);
   }
@@ -451,13 +444,11 @@
    * [changeFile] invocation.
    */
   void changeFile(String path) {
-    if (AnalysisEngine.isDartFileName(path)) {
-      _changedFiles.add(path);
-      if (_addedFiles.contains(path)) {
-        _filesToAnalyze.add(path);
-      }
-      _priorityResults.clear();
+    _changedFiles.add(path);
+    if (_addedFiles.contains(path)) {
+      _filesToAnalyze.add(path);
     }
+    _priorityResults.clear();
     _statusSupport.transitionToAnalyzing();
     _scheduler._notify(this);
   }
@@ -476,18 +467,10 @@
     }
     if (sourceFactory != null) {
       _sourceFactory = sourceFactory;
-      _sdkBundle = sourceFactory.dartSdk.getLinkedBundle();
     }
     _fillSalt();
-    _fsState = new FileSystemState(
-        _logger,
-        _byteStore,
-        _contentOverlay,
-        _resourceProvider,
-        _sourceFactory,
-        _analysisOptions,
-        _salt,
-        _sdkBundle.apiSignature);
+    _fsState = new FileSystemState(_logger, _byteStore, _contentOverlay,
+        _resourceProvider, _sourceFactory, _analysisOptions, _salt);
     _filesToAnalyze.addAll(_addedFiles);
     _statusSupport.transitionToAnalyzing();
     _scheduler._notify(this);
@@ -517,9 +500,6 @@
    * the file with the given [path].
    */
   Future<AnalysisDriverUnitIndex> getIndex(String path) {
-    if (!AnalysisEngine.isDartFileName(path)) {
-      return new Future.value();
-    }
     var completer = new Completer<AnalysisDriverUnitIndex>();
     _indexRequestedFiles
         .putIfAbsent(path, () => <Completer<AnalysisDriverUnitIndex>>[])
@@ -547,10 +527,6 @@
    * state transitions to "idle".
    */
   Future<AnalysisResult> getResult(String path) {
-    if (!AnalysisEngine.isDartFileName(path)) {
-      return new Future.value();
-    }
-
     // Return the cached result.
     {
       AnalysisResult result = _priorityResults[path];
@@ -587,9 +563,6 @@
    * file with the given [path].
    */
   Future<CompilationUnitElement> getUnitElement(String path) {
-    if (!AnalysisEngine.isDartFileName(path)) {
-      return new Future.value();
-    }
     var completer = new Completer<CompilationUnitElement>();
     _unitElementRequestedFiles
         .putIfAbsent(path, () => <Completer<CompilationUnitElement>>[])
@@ -639,6 +612,14 @@
   }
 
   /**
+   * Return a future that will be completed the next time the status is idle.
+   *
+   * If the status is currently idle, the returned future will be signaled
+   * immediately.
+   */
+  Future<Null> waitForIdle() => _statusSupport.waitForIdle();
+
+  /**
    * Return the cached or newly computed analysis result of the file with the
    * given [path].
    *
@@ -761,7 +742,9 @@
   AnalysisContext _createAnalysisContext(_LibraryContext libraryContext) {
     AnalysisContextImpl analysisContext =
         AnalysisEngine.instance.createAnalysisContext();
+    analysisContext.useSdkCachePartition = false;
     analysisContext.analysisOptions = _analysisOptions;
+    analysisContext.declaredVariables.addAll(declaredVariables);
     analysisContext.sourceFactory = _sourceFactory.clone();
     analysisContext.contentCache = new _ContentCacheWrapper(_fsState);
     analysisContext.resultProvider =
@@ -776,15 +759,18 @@
     return _logger.run('Create library context', () {
       Map<String, FileState> libraries = <String, FileState>{};
       SummaryDataStore store = new SummaryDataStore(const <String>[]);
-      store.addBundle(null, _sdkBundle);
+
+      if (_sdkBundle != null) {
+        store.addBundle(null, _sdkBundle);
+      }
 
       void appendLibraryFiles(FileState library) {
-        // URIs with the 'dart:' scheme are served from the SDK bundle.
-        if (library.uri.scheme == 'dart') {
-          return null;
-        }
-
         if (!libraries.containsKey(library.uriStr)) {
+          // Serve 'dart:' URIs from the SDK bundle.
+          if (_sdkBundle != null && library.uri.scheme == 'dart') {
+            return;
+          }
+
           libraries[library.uriStr] = library;
 
           // Append the defining unit.
@@ -1497,11 +1483,13 @@
   }
 
   /**
-   * Write a new line into the log
+   * Write a new line into the log.
    */
   void writeln(String msg) {
-    String indent = '\t' * _level;
-    sink.writeln('$indent$msg');
+    if (sink != null) {
+      String indent = '\t' * _level;
+      sink.writeln('$indent$msg');
+    }
   }
 }
 
@@ -1549,11 +1537,17 @@
 
   @override
   bool getExists(Source source) {
+    if (source.isInSystemLibrary) {
+      return true;
+    }
     return _getFileForSource(source).exists;
   }
 
   @override
   int getModificationStamp(Source source) {
+    if (source.isInSystemLibrary) {
+      return 0;
+    }
     return _getFileForSource(source).exists ? 0 : -1;
   }
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index ba54b8b..eeb734a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -301,7 +301,6 @@
     if (_transitiveSignature == null) {
       ApiSignature signature = new ApiSignature();
       signature.addUint32List(_fsState._salt);
-      signature.addString(_fsState._sdkApiSignature);
       signature.addInt(transitiveFiles.length);
       transitiveFiles
           .map((file) => file.apiSignature)
@@ -436,37 +435,29 @@
     _partedFiles = <FileState>[];
     _exportFilters = <NameFilter>[];
     for (UnlinkedImport import in _unlinked.imports) {
-      if (!import.isImplicit) {
-        String uri = import.uri;
-        if (_isDartFileUri(uri)) {
-          FileState file = _fileForRelativeUri(uri);
-          if (file != null) {
-            _importedFiles.add(file);
-          }
-        }
+      String uri = import.isImplicit ? 'dart:core' : import.uri;
+      FileState file = _fileForRelativeUri(uri);
+      if (file != null) {
+        _importedFiles.add(file);
       }
     }
     for (UnlinkedExportPublic export in _unlinked.publicNamespace.exports) {
       String uri = export.uri;
-      if (_isDartFileUri(uri)) {
-        FileState file = _fileForRelativeUri(uri);
-        if (file != null) {
-          _exportedFiles.add(file);
-          _exportFilters
-              .add(new NameFilter.forUnlinkedCombinators(export.combinators));
-        }
+      FileState file = _fileForRelativeUri(uri);
+      if (file != null) {
+        _exportedFiles.add(file);
+        _exportFilters
+            .add(new NameFilter.forUnlinkedCombinators(export.combinators));
       }
     }
     for (String uri in _unlinked.publicNamespace.parts) {
-      if (_isDartFileUri(uri)) {
-        FileState file = _fileForRelativeUri(uri);
-        if (file != null) {
-          _partedFiles.add(file);
-          // TODO(scheglov) Sort for stable results?
-          _fsState._partToLibraries
-              .putIfAbsent(file, () => <FileState>[])
-              .add(this);
-        }
+      FileState file = _fileForRelativeUri(uri);
+      if (file != null) {
+        _partedFiles.add(file);
+        // TODO(scheglov) Sort for stable results?
+        _fsState._partToLibraries
+            .putIfAbsent(file, () => <FileState>[])
+            .add(this);
       }
     }
 
@@ -524,10 +515,6 @@
     }
     return true;
   }
-
-  static bool _isDartFileUri(String uri) {
-    return !uri.startsWith('dart:') && AnalysisEngine.isDartFileName(uri);
-  }
 }
 
 /**
@@ -541,7 +528,6 @@
   final SourceFactory _sourceFactory;
   final AnalysisOptions _analysisOptions;
   final Uint32List _salt;
-  final String _sdkApiSignature;
 
   /**
    * Mapping from a URI to the corresponding [FileState].
@@ -577,8 +563,7 @@
       this._resourceProvider,
       this._sourceFactory,
       this._analysisOptions,
-      this._salt,
-      this._sdkApiSignature) {
+      this._salt) {
     _testView = new FileSystemStateTestView(this);
   }
 
@@ -607,7 +592,7 @@
       // Try to get the existing instance.
       file = _uriToFile[uri];
       // If we have a file, call it the canonical one and return it.
-      if (file != null) {
+      if (file != null && file.path == path) {
         _pathToCanonicalFile[path] = file;
         return file;
       }
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
index d9e8118..b733e19 100644
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -142,6 +142,37 @@
     return elements;
   }
 
+  /**
+   * Returns unresolved references to the given [name].
+   */
+  Future<List<SearchResult>> unresolvedMemberReferences(String name) async {
+    if (name == null) {
+      return const <SearchResult>[];
+    }
+
+    // Prepare the list of files that reference the name.
+    List<String> files = await _driver.getFilesReferencingName(name);
+
+    // Check the index of every file that references the element name.
+    List<SearchResult> results = [];
+    for (String file in files) {
+      AnalysisDriverUnitIndex index = await _driver.getIndex(file);
+      _IndexRequest request = new _IndexRequest(index);
+      var fileResults = await request.getUnresolvedMemberReferences(
+          name,
+          const {
+            IndexRelationKind.IS_READ_BY: SearchResultKind.READ,
+            IndexRelationKind.IS_WRITTEN_BY: SearchResultKind.WRITE,
+            IndexRelationKind.IS_READ_WRITTEN_BY: SearchResultKind.READ_WRITE,
+            IndexRelationKind.IS_INVOKED_BY: SearchResultKind.INVOCATION
+          },
+          () => _driver.getUnitElement(file));
+      results.addAll(fileResults);
+    }
+
+    return results;
+  }
+
   Future<Null> _addResults(List<SearchResult> results, Element element,
       Map<IndexRelationKind, SearchResultKind> relationToResultKind) async {
     // Prepare the element name.
@@ -704,6 +735,45 @@
   }
 
   /**
+   * Return a list of results where a class members with the given [name] is
+   * referenced with a qualifier, but is not resolved.
+   */
+  Future<List<SearchResult>> getUnresolvedMemberReferences(
+      String name,
+      Map<IndexRelationKind, SearchResultKind> relationToResultKind,
+      Future<CompilationUnitElement> getEnclosingUnitElement()) async {
+    // Find the name identifier.
+    int nameId = getStringId(name);
+    if (nameId == -1) {
+      return const <SearchResult>[];
+    }
+
+    // Find the first usage of the name.
+    int i = _findFirstOccurrence(index.usedNames, nameId);
+    if (i == -1) {
+      return const <SearchResult>[];
+    }
+
+    // Create results for every usage of the name.
+    List<SearchResult> results = <SearchResult>[];
+    CompilationUnitElement enclosingUnitElement = null;
+    for (; i < index.usedNames.length && index.usedNames[i] == nameId; i++) {
+      IndexRelationKind relationKind = index.usedNameKinds[i];
+      SearchResultKind resultKind = relationToResultKind[relationKind];
+      if (resultKind != null) {
+        int offset = index.usedNameOffsets[i];
+        enclosingUnitElement ??= await getEnclosingUnitElement();
+        Element enclosingElement =
+            _getEnclosingElement(enclosingUnitElement, offset);
+        results.add(new SearchResult._(enclosingElement, resultKind, offset,
+            name.length, false, index.usedNameIsQualifiedFlags[i]));
+      }
+    }
+
+    return results;
+  }
+
+  /**
    * Return the identifier of the [uri] in the [index] or `-1` if the [uri] is
    * not used in the [index].
    */
diff --git a/pkg/analyzer/lib/src/dart/analysis/status.dart b/pkg/analyzer/lib/src/dart/analysis/status.dart
index 5431023..e70de68 100644
--- a/pkg/analyzer/lib/src/dart/analysis/status.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/status.dart
@@ -73,6 +73,12 @@
   AnalysisStatus _currentStatus = AnalysisStatus.IDLE;
 
   /**
+   * If non-null, a completer which should be completed on the next transition
+   * to idle.
+   */
+  Completer<Null> _idleCompleter;
+
+  /**
    * Return the last status sent to the [stream].
    */
   AnalysisStatus get currentStatus => _currentStatus;
@@ -99,6 +105,23 @@
     if (_currentStatus != AnalysisStatus.IDLE) {
       _currentStatus = AnalysisStatus.IDLE;
       _statusController.add(AnalysisStatus.IDLE);
+      _idleCompleter?.complete();
+      _idleCompleter = null;
+    }
+  }
+
+  /**
+   * Return a future that will be completed the next time the status is idle.
+   *
+   * If the status is currently idle, the returned future will be signaled
+   * immediately.
+   */
+  Future<Null> waitForIdle() {
+    if (_currentStatus == AnalysisStatus.IDLE) {
+      return new Future.value();
+    } else {
+      _idleCompleter ??= new Completer<Null>();
+      return _idleCompleter.future;
     }
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index d157276..8722aa4 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -2522,9 +2522,10 @@
       _directives.accept(visitor);
       _declarations.accept(visitor);
     } else {
-      int length = sortedDirectivesAndDeclarations.length;
+      List<AstNode> sortedMembers = sortedDirectivesAndDeclarations;
+      int length = sortedMembers.length;
       for (int i = 0; i < length; i++) {
-        AstNode child = sortedDirectivesAndDeclarations[i];
+        AstNode child = sortedMembers[i];
         child.accept(visitor);
       }
     }
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index f615ef3..4d709d5 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -7384,6 +7384,7 @@
   @override
   Object visitFieldFormalParameter(FieldFormalParameter node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
+    _visitTokenWithSuffix(node.covariantKeyword, ' ');
     _visitTokenWithSuffix(node.keyword, " ");
     _visitNodeWithSuffix(node.type, " ");
     _writer.print("this.");
@@ -7510,6 +7511,7 @@
   @override
   Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
+    _visitTokenWithSuffix(node.covariantKeyword, ' ');
     _visitNodeWithSuffix(node.returnType, " ");
     _visitNode(node.identifier);
     _visitNode(node.typeParameters);
@@ -7864,6 +7866,7 @@
   @override
   Object visitSimpleFormalParameter(SimpleFormalParameter node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
+    _visitTokenWithSuffix(node.covariantKeyword, ' ');
     _visitTokenWithSuffix(node.keyword, " ");
     _visitNodeWithSuffix(node.type, " ");
     _visitNode(node.identifier);
@@ -8691,6 +8694,7 @@
   @override
   Object visitFieldFormalParameter(FieldFormalParameter node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
+    safelyVisitTokenWithSuffix(node.covariantKeyword, ' ');
     safelyVisitTokenWithSuffix(node.keyword, " ");
     safelyVisitNodeWithSuffix(node.type, " ");
     sink.write("this.");
@@ -8817,6 +8821,7 @@
   @override
   Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
+    safelyVisitTokenWithSuffix(node.covariantKeyword, ' ');
     safelyVisitNodeWithSuffix(node.returnType, " ");
     safelyVisitNode(node.identifier);
     safelyVisitNode(node.typeParameters);
@@ -9171,6 +9176,7 @@
   @override
   Object visitSimpleFormalParameter(SimpleFormalParameter node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
+    safelyVisitTokenWithSuffix(node.covariantKeyword, ' ');
     safelyVisitTokenWithSuffix(node.keyword, " ");
     safelyVisitNodeWithSuffix(node.type, " ");
     safelyVisitNode(node.identifier);
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index 17af70d..17f98e9 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -236,6 +236,7 @@
           new FieldFormalParameterElementImpl.forNode(parameterName);
       _setCodeRange(parameter, node);
       parameter.isConst = node.isConst;
+      parameter.isExplicitlyCovariant = node.covariantKeyword != null;
       parameter.isFinal = node.isFinal;
       parameter.parameterKind = node.kind;
       if (field != null) {
@@ -621,6 +622,7 @@
         field = new FieldElementImpl.forNode(fieldName);
       }
       element = field;
+      field.isCovariant = fieldNode.covariantKeyword != null;
       field.isStatic = fieldNode.isStatic;
       _setCodeRange(element, node);
       setElementDocumentationComment(element, fieldNode);
@@ -653,6 +655,10 @@
       if (!isConst && !isFinal) {
         PropertyAccessorElementImpl_ImplicitSetter setter =
             new PropertyAccessorElementImpl_ImplicitSetter(element);
+        if (fieldNode != null) {
+          (setter.parameters[0] as ParameterElementImpl).isExplicitlyCovariant =
+              fieldNode.covariantKeyword != null;
+        }
         _currentHolder.addAccessor(setter);
       }
     }
@@ -1389,6 +1395,7 @@
     }
     _setCodeRange(parameter, node);
     parameter.isConst = node.isConst;
+    parameter.isExplicitlyCovariant = node.parameter.covariantKeyword != null;
     parameter.isFinal = node.isFinal;
     parameter.parameterKind = node.kind;
     // visible range
@@ -1410,6 +1417,9 @@
       ParameterElementImpl parameter =
           new ParameterElementImpl.forNode(parameterName);
       _setCodeRange(parameter, node);
+      parameter.isConst = node.isConst;
+      parameter.isExplicitlyCovariant = node.covariantKeyword != null;
+      parameter.isFinal = node.isFinal;
       parameter.parameterKind = node.kind;
       _setParameterVisibleRange(node, parameter);
       _currentHolder.addParameter(parameter);
@@ -1437,6 +1447,7 @@
           new ParameterElementImpl.forNode(parameterName);
       _setCodeRange(parameter, node);
       parameter.isConst = node.isConst;
+      parameter.isExplicitlyCovariant = node.covariantKeyword != null;
       parameter.isFinal = node.isFinal;
       parameter.parameterKind = node.kind;
       _setParameterVisibleRange(node, parameter);
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 408d4e5..ac89153 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1764,7 +1764,7 @@
   void visitChildren(ElementVisitor visitor) {
     super.visitChildren(visitor);
     safelyVisitChildren(accessors, visitor);
-    safelyVisitChildren(_enums, visitor);
+    safelyVisitChildren(enums, visitor);
     safelyVisitChildren(functions, visitor);
     safelyVisitChildren(functionTypeAliases, visitor);
     safelyVisitChildren(types, visitor);
@@ -4218,6 +4218,24 @@
   @override
   ClassElement get enclosingElement => super.enclosingElement as ClassElement;
 
+  /**
+   * Return `true` if this field was explicitly marked as being covariant.
+   */
+  bool get isCovariant {
+    if (_unlinkedVariable != null) {
+      return _unlinkedVariable.isCovariant;
+    }
+    return hasModifier(Modifier.COVARIANT);
+  }
+
+  /**
+   * Set whether this field is explicitly marked as being covariant.
+   */
+  void set isCovariant(bool isCovariant) {
+    _assertNotResynthesized(_unlinkedVariable);
+    setModifier(Modifier.COVARIANT, isCovariant);
+  }
+
   @override
   bool get isEnumConstant =>
       enclosingElement != null ? enclosingElement.isEnum : false;
@@ -4299,9 +4317,14 @@
   @override
   FieldElement get field {
     if (_unlinkedParam != null && _field == null) {
-      Element enclosingClass = enclosingElement?.enclosingElement;
-      if (enclosingClass is ClassElement) {
-        _field = enclosingClass.getField(_unlinkedParam.name);
+      Element enclosing = enclosingElement?.enclosingElement;
+      while (enclosing != null) {
+        if (enclosing is ClassElement) {
+          _field = enclosing.getField(_unlinkedParam.name);
+          break;
+        } else {
+          enclosing = enclosing.enclosingElement;
+        }
       }
     }
     return _field;
@@ -4838,7 +4861,7 @@
   void visitChildren(ElementVisitor visitor) {
     super.visitChildren(visitor);
     safelyVisitChildren(parameters, visitor);
-    safelyVisitChildren(_typeParameters, visitor);
+    safelyVisitChildren(typeParameters, visitor);
   }
 }
 
@@ -5513,7 +5536,18 @@
   }
 
   @override
-  bool get hasExtUri => hasModifier(Modifier.HAS_EXT_URI);
+  bool get hasExtUri {
+    if (_unlinkedDefiningUnit != null) {
+      List<UnlinkedImport> unlinkedImports = _unlinkedDefiningUnit.imports;
+      for (UnlinkedImport import in unlinkedImports) {
+        if (DartUriResolver.isDartExtUri(import.uri)) {
+          return true;
+        }
+      }
+      return false;
+    }
+    return hasModifier(Modifier.HAS_EXT_URI);
+  }
 
   /**
    * Set whether this library has an import of a "dart-ext" URI.
@@ -6291,76 +6325,81 @@
   static const Modifier CONST = const Modifier('CONST', 2);
 
   /**
+   * Indicates that the modifier 'covariant' was applied to the element.
+   */
+  static const Modifier COVARIANT = const Modifier('COVARIANT', 3);
+
+  /**
    * Indicates that the import element represents a deferred library.
    */
-  static const Modifier DEFERRED = const Modifier('DEFERRED', 3);
+  static const Modifier DEFERRED = const Modifier('DEFERRED', 4);
 
   /**
    * Indicates that a class element was defined by an enum declaration.
    */
-  static const Modifier ENUM = const Modifier('ENUM', 4);
+  static const Modifier ENUM = const Modifier('ENUM', 5);
 
   /**
    * Indicates that a class element was defined by an enum declaration.
    */
-  static const Modifier EXTERNAL = const Modifier('EXTERNAL', 5);
+  static const Modifier EXTERNAL = const Modifier('EXTERNAL', 6);
 
   /**
    * Indicates that the modifier 'factory' was applied to the element.
    */
-  static const Modifier FACTORY = const Modifier('FACTORY', 6);
+  static const Modifier FACTORY = const Modifier('FACTORY', 7);
 
   /**
    * Indicates that the modifier 'final' was applied to the element.
    */
-  static const Modifier FINAL = const Modifier('FINAL', 7);
+  static const Modifier FINAL = const Modifier('FINAL', 8);
 
   /**
    * Indicates that an executable element has a body marked as being a
    * generator.
    */
-  static const Modifier GENERATOR = const Modifier('GENERATOR', 8);
+  static const Modifier GENERATOR = const Modifier('GENERATOR', 9);
 
   /**
    * Indicates that the pseudo-modifier 'get' was applied to the element.
    */
-  static const Modifier GETTER = const Modifier('GETTER', 9);
+  static const Modifier GETTER = const Modifier('GETTER', 10);
 
   /**
    * A flag used for libraries indicating that the defining compilation unit
    * contains at least one import directive whose URI uses the "dart-ext"
    * scheme.
    */
-  static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 10);
+  static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 11);
 
   /**
    * Indicates that the associated element did not have an explicit type
    * associated with it. If the element is an [ExecutableElement], then the
    * type being referred to is the return type.
    */
-  static const Modifier IMPLICIT_TYPE = const Modifier('IMPLICIT_TYPE', 11);
+  static const Modifier IMPLICIT_TYPE = const Modifier('IMPLICIT_TYPE', 12);
 
   /**
    * Indicates that a class is a mixin application.
    */
   static const Modifier MIXIN_APPLICATION =
-      const Modifier('MIXIN_APPLICATION', 12);
+      const Modifier('MIXIN_APPLICATION', 13);
 
   /**
    * Indicates that a class contains an explicit reference to 'super'.
    */
   static const Modifier REFERENCES_SUPER =
-      const Modifier('REFERENCES_SUPER', 13);
+      const Modifier('REFERENCES_SUPER', 14);
 
   /**
    * Indicates that the pseudo-modifier 'set' was applied to the element.
    */
-  static const Modifier SETTER = const Modifier('SETTER', 14);
+  static const Modifier SETTER = const Modifier('SETTER', 15);
 
   /**
    * Indicates that the modifier 'static' was applied to the element.
    */
-  static const Modifier STATIC = const Modifier('STATIC', 15);
+  static const Modifier STATIC = const Modifier('STATIC', 16);
 
   /**
    * Indicates that the element does not appear in the source code but was
@@ -6368,12 +6407,13 @@
    * constructors, an implicit zero-argument constructor will be created and it
    * will be marked as being synthetic.
    */
-  static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 16);
+  static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 17);
 
   static const List<Modifier> values = const [
     ABSTRACT,
     ASYNCHRONOUS,
     CONST,
+    COVARIANT,
     DEFERRED,
     ENUM,
     EXTERNAL,
@@ -7091,7 +7131,7 @@
 
   @override
   bool get isCovariant {
-    if (inheritsCovariant) {
+    if (isExplicitlyCovariant || inheritsCovariant) {
       return true;
     }
     for (ElementAnnotationImpl annotation in metadata) {
@@ -7102,10 +7142,28 @@
     return false;
   }
 
+  /**
+   * Return true if this parameter is explicitly marked as being covariant.
+   */
+  bool get isExplicitlyCovariant {
+    if (_unlinkedParam != null) {
+      return _unlinkedParam.isExplicitlyCovariant;
+    }
+    return hasModifier(Modifier.COVARIANT);
+  }
+
+  /**
+   * Set whether this variable parameter is explicitly marked as being covariant.
+   */
+  void set isExplicitlyCovariant(bool isCovariant) {
+    _assertNotResynthesized(_unlinkedParam);
+    setModifier(Modifier.COVARIANT, isCovariant);
+  }
+
   @override
   bool get isFinal {
     if (_unlinkedParam != null) {
-      return false;
+      return _unlinkedParam.isFinal;
     }
     return super.isFinal;
   }
@@ -7368,7 +7426,7 @@
 
   @override
   bool get isCovariant {
-    if (inheritsCovariant) {
+    if (isExplicitlyCovariant || inheritsCovariant) {
       return true;
     }
     for (ElementAnnotationImpl annotation in setter.variable.metadata) {
@@ -7380,6 +7438,15 @@
   }
 
   @override
+  bool get isExplicitlyCovariant {
+    PropertyInducingElement variable = setter.variable;
+    if (variable is FieldElementImpl) {
+      return variable.isCovariant;
+    }
+    return false;
+  }
+
+  @override
   DartType get type => setter.variable.type;
 
   @override
@@ -7819,6 +7886,8 @@
  * The context in which elements are resynthesized.
  */
 abstract class ResynthesizerContext {
+  bool get isStrongMode;
+
   /**
    * Build [ElementAnnotationImpl] for the given [UnlinkedExpr].
    */
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index 22e24ca..06be4db 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -604,7 +604,7 @@
 
   @override
   FunctionType getReifiedType(DartType objectType) =>
-      baseElement.getReifiedType(objectType);
+      substituteFor(baseElement.getReifiedType(objectType));
 
   @override
   String toString() {
@@ -908,13 +908,11 @@
  * [FunctionType.returnType], and [ParameterMember].
  */
 class TypeParameterMember extends Member implements TypeParameterElement {
-  @override
-  final DartType bound;
-
+  DartType _bound;
   DartType _type;
 
   TypeParameterMember(
-      TypeParameterElement baseElement, DartType definingType, this.bound)
+      TypeParameterElement baseElement, DartType definingType, this._bound)
       : super(baseElement, definingType) {
     _type = new TypeParameterTypeImpl(this);
   }
@@ -924,6 +922,9 @@
       super.baseElement as TypeParameterElement;
 
   @override
+  DartType get bound => _bound;
+
+  @override
   Element get enclosingElement => baseElement.enclosingElement;
 
   @override
@@ -943,19 +944,41 @@
    * the given parameter. Return the member that was created, or the base
    * parameter if no member was created.
    */
-  static TypeParameterElement from(
-      TypeParameterElement parameter, ParameterizedType definingType) {
-    if (parameter?.bound == null || definingType.typeArguments.isEmpty) {
-      return parameter;
-    }
-
-    DartType bound = parameter.bound;
+  static List<TypeParameterElement> from(
+      List<TypeParameterElement> formals, FunctionType definingType) {
     List<DartType> argumentTypes = definingType.typeArguments;
+    if (argumentTypes.isEmpty) {
+      return formals;
+    }
     List<DartType> parameterTypes =
         TypeParameterTypeImpl.getTypes(definingType.typeParameters);
-    DartType substitutedBound =
-        bound.substitute2(argumentTypes, parameterTypes);
-    return new TypeParameterMember(parameter, definingType, substitutedBound);
+
+    // Create type formals with specialized bounds.
+    // For example `<U extends T>` where T comes from an outer scope.
+    var results = formals.toList(growable: false);
+    for (int i = 0; i < results.length; i++) {
+      var formal = results[i];
+      DartType bound = formal?.bound;
+      if (bound != null) {
+        // substitute type arguments from the function.
+        bound = bound.substitute2(argumentTypes, parameterTypes);
+        results[i] = new TypeParameterMember(formal, definingType, bound);
+      }
+    }
+    List<TypeParameterType> formalTypes =
+        TypeParameterTypeImpl.getTypes(formals);
+    for (var formal in results) {
+      if (formal is TypeParameterMember) {
+        // Recursive bounds are allowed too, so make sure these are updated
+        // to refer to any new TypeParameterMember we just made, rather than
+        // the original type parameter
+        // TODO(jmesserly): this is required so substituting for the
+        // type formal will work. Investigate if there's a better solution.
+        formal._bound = formal.bound
+            .substitute2(TypeParameterTypeImpl.getTypes(results), formalTypes);
+      }
+    }
+    return results;
   }
 }
 
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index c1feff9..b950803 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -602,13 +602,7 @@
 
     // Create type formals with specialized bounds.
     // For example `<U extends T>` where T comes from an outer scope.
-    List<TypeParameterElement> result =
-        new List<TypeParameterElement>(formalCount);
-
-    for (int i = 0; i < formalCount; i++) {
-      result[i] = TypeParameterMember.from(baseTypeFormals[i], this);
-    }
-    return result;
+    return TypeParameterMember.from(baseTypeFormals, this);
   }
 
   @override
@@ -1387,6 +1381,15 @@
   }
 
   @override
+  bool get isDartAsyncFutureOr {
+    ClassElement element = this.element;
+    if (element == null) {
+      return false;
+    }
+    return element.name == "FutureOr" && element.library.isDartAsync;
+  }
+
+  @override
   bool get isDartCoreFunction {
     ClassElement element = this.element;
     if (element == null) {
@@ -2383,6 +2386,9 @@
   bool get isDartAsyncFuture => false;
 
   @override
+  bool get isDartAsyncFutureOr => false;
+
+  @override
   bool get isDartCoreFunction => false;
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index a81585b..72eb3ce 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -95,6 +95,30 @@
       "Try replacing the use of the deprecated member with the replacement.");
 
   /**
+   * Users should not create a class named `Function` anymore.
+   */
+  static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = const HintCode(
+      'DEPRECATED_FUNCTION_CLASS_DECLARATION',
+      "Declaring a class named 'Function' is deprecated.",
+      "Try renaming the class.");
+
+  /**
+   * `Function` should not be extended anymore.
+   */
+  static const HintCode DEPRECATED_EXTENDS_FUNCTION = const HintCode(
+      'DEPRECATED_EXTENDS_FUNCTION',
+      "Extending 'Function' is deprecated.",
+      "Try removing 'Function' from the 'extends' clause.");
+
+  /**
+   * `Function` should not be mixed in anymore.
+   */
+  static const HintCode DEPRECATED_MIXIN_FUNCTION = const HintCode(
+      'DEPRECATED_MIXIN_FUNCTION',
+      "Mixing in 'Function' is deprecated.",
+      "Try removing 'Function' from the 'with' clause.");
+
+  /**
    * Hint to use the ~/ operator.
    */
   static const HintCode DIVISION_OPTIMIZATION = const HintCode(
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 18fef4c..70f1124 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -82,6 +82,11 @@
       "For-in loops use 'in' rather than a colon.",
       "Try replacing the colon with the keyword 'in'.");
 
+  static const ParserErrorCode CONST_AND_COVARIANT = const ParserErrorCode(
+      'CONST_AND_COVARIANT',
+      "Members can't be declared to be both 'const' and 'covariant'.",
+      "Try removing either the 'const' or 'covariant' keyword.");
+
   static const ParserErrorCode CONST_AND_FINAL = const ParserErrorCode(
       'CONST_AND_FINAL',
       "Members can't be declared to be both 'const' and 'final'.",
@@ -142,6 +147,32 @@
       "A continue statement in a switch statement must have a label as a target.",
       "Try adding a label associated with one of the case clauses to the continue statement.");
 
+  static const ParserErrorCode COVARIANT_AFTER_VAR = const ParserErrorCode(
+      'COVARIANT_AFTER_VAR',
+      "The modifier 'covariant' should be before the modifier 'var'.",
+      "Try re-ordering the modifiers.");
+
+  static const ParserErrorCode COVARIANT_AND_STATIC = const ParserErrorCode(
+      'COVARIANT_AND_STATIC',
+      "Members can't be declared to be both 'covariant' and 'static'.",
+      "Try removing either the 'covariant' or 'static' keyword.");
+
+  static const ParserErrorCode COVARIANT_MEMBER = const ParserErrorCode(
+      'COVARIANT_MEMBER',
+      "Getters, setters and methods can't be declared to be 'covariant'.",
+      "Try removing the 'covariant' keyword.");
+
+  static const ParserErrorCode COVARIANT_TOP_LEVEL_DECLARATION =
+      const ParserErrorCode(
+          'COVARIANT_TOP_LEVEL_DECLARATION',
+          "Top-level declarations can't be declared to be covariant.",
+          "Try removing the keyword 'covariant'.");
+
+  static const ParserErrorCode COVARIANT_CONSTRUCTOR = const ParserErrorCode(
+      'COVARIANT_CONSTRUCTOR',
+      "A constructor can't be declared to be 'covariant'.",
+      "Try removing the keyword 'covariant'.");
+
   static const ParserErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE =
       const ParserErrorCode(
           'DEFAULT_VALUE_IN_FUNCTION_TYPE',
@@ -322,6 +353,11 @@
           "Field formal parameters can only be used in a constructor.",
           "Try replacing the field formal parameter with a normal parameter.");
 
+  static const ParserErrorCode FINAL_AND_COVARIANT = const ParserErrorCode(
+      'FINAL_AND_COVARIANT',
+      "Members can't be declared to be both 'final' and 'covariant'.",
+      "Try removing either the 'final' or 'covariant' keyword.");
+
   static const ParserErrorCode FINAL_AND_VAR = const ParserErrorCode(
       'FINAL_AND_VAR',
       "Members can't be declared to be both 'final' and 'var'.",
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index d66526e..11b7e9b 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -22,7 +22,7 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
-import 'package:analyzer/src/summary/summary_sdk.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:path/path.dart' as pathos;
 import 'package:yaml/yaml.dart';
 
@@ -89,11 +89,12 @@
       SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
       _analysisContext.sourceFactory = factory;
       if (_useSummary) {
-        bool strongMode = _analysisOptions?.strongMode ?? false;
         PackageBundle sdkBundle = getLinkedBundle();
         if (sdkBundle != null) {
-          _analysisContext.resultProvider = new SdkSummaryResultProvider(
-              _analysisContext, sdkBundle, strongMode);
+          SummaryDataStore dataStore = new SummaryDataStore([]);
+          dataStore.addBundle(null, sdkBundle);
+          _analysisContext.resultProvider =
+              new InputPackagesResultProvider(_analysisContext, dataStore);
         }
       }
     }
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 41cf63a..9b4b73d 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -1457,6 +1457,16 @@
           "Try replacing the type parameter with a different type.");
 
   /**
+   * The 'covariant' keyword was found in an inappropriate location.
+   */
+  static const CompileTimeErrorCode INVALID_USE_OF_COVARIANT =
+      const CompileTimeErrorCode(
+          'INVALID_USE_OF_COVARIANT',
+          "The 'covariant' keyword can only be used for parameters in instance "
+          "methods or before non-final instance fields.",
+          "Try removing the 'covariant' keyword.");
+
+  /**
    * 14.2 Exports: It is a compile-time error if the compilation unit found at
    * the specified URI is not a library declaration.
    *
@@ -4888,6 +4898,18 @@
       "Missing type arguments for calling generic function type '{0}'.",
       _implicitDynamicCorrection);
 
+  static const StrongModeCode NO_DEFAULT_BOUNDS = const StrongModeCode(
+      ErrorType.COMPILE_TIME_ERROR,
+      'NO_DEFAULT_BOUNDS',
+      "Type has no default bounds",
+      "Try adding explicit type arguments to type");
+
+  static const StrongModeCode NOT_INSTANTIATED_BOUND = const StrongModeCode(
+      ErrorType.COMPILE_TIME_ERROR,
+      'NOT_INSTANTIATED_BOUND',
+      "Type parameter bound types must be instantiated.",
+      "Try adding type arguments.");
+
   static const StrongModeCode UNSAFE_BLOCK_CLOSURE_INFERENCE = const StrongModeCode(
       ErrorType.STATIC_WARNING,
       'UNSAFE_BLOCK_CLOSURE_INFERENCE',
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index d92e8db..97b7250 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1653,9 +1653,17 @@
       buffer.addBool(enableLazyAssignmentOperators);
       buffer.addBool(enableStrictCallChecks);
       buffer.addBool(enableSuperMixins);
+      buffer.addBool(implicitCasts);
+      buffer.addBool(implicitDynamic);
       buffer.addBool(strongMode);
       buffer.addBool(strongModeHints);
 
+      // Append error processors.
+      buffer.addInt(errorProcessors.length);
+      for (ErrorProcessor processor in errorProcessors) {
+        buffer.addString(processor.description);
+      }
+
       // Append lints.
       buffer.addInt(lintRules.length);
       for (Linter lintRule in lintRules) {
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index befeccf..ffef5db 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -492,6 +492,7 @@
       _checkForFinalNotInitializedInClass(node);
       _checkForDuplicateDefinitionInheritance();
       _checkForConflictingInstanceMethodSetter(node);
+      _checkForBadFunctionUse(node);
       return super.visitClassDeclaration(node);
     } finally {
       _isInNativeClass = false;
@@ -739,6 +740,7 @@
   @override
   Object visitFormalParameterList(FormalParameterList node) {
     _checkDuplicateDefinitionInParameterList(node);
+    _checkUseOfCovariantInParameters(node);
     return super.visitFormalParameterList(node);
   }
 
@@ -819,7 +821,7 @@
           StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION,
           functionExpression);
     } else if (expressionType is FunctionType) {
-      _checkTypeArguments(expressionType.element, node.typeArguments);
+      _checkTypeArguments(node);
     }
     _checkForImplicitDynamicInvoke(node);
     return super.visitFunctionExpressionInvocation(node);
@@ -1030,8 +1032,7 @@
     } else {
       _checkForUnqualifiedReferenceToNonLocalStaticMember(methodName);
     }
-    _checkTypeArguments(
-        node.methodName.staticElement, node.typeArguments, target?.staticType);
+    _checkTypeArguments(node);
     _checkForImplicitDynamicInvoke(node);
     return super.visitMethodInvocation(node);
   }
@@ -1222,6 +1223,7 @@
     _checkForTypeParameterSupertypeOfItsBound(node);
     _checkForTypeAnnotationDeferredClass(node.bound);
     _checkForImplicitDynamicType(node.bound);
+    _checkForNotInstantiatedBound(node.bound);
     return super.visitTypeParameter(node);
   }
 
@@ -2719,8 +2721,8 @@
     if (constructorName != null &&
         constructorElement != null &&
         !constructorName.isSynthetic) {
-      if (classElement.getField(name) != null) {
-        // fields
+      FieldElement field = classElement.getField(name);
+      if (field != null && field.getter != null) {
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
             constructor,
@@ -2941,6 +2943,40 @@
   }
 
   /**
+   * Verifies that the class is not named `Function` and that it doesn't
+   * extends/implements/mixes in `Function`.
+   */
+  void _checkForBadFunctionUse(ClassDeclaration node) {
+    ExtendsClause extendsClause = node.extendsClause;
+    ImplementsClause implementsClause = node.implementsClause;
+    WithClause withClause = node.withClause;
+
+    if (node.name.name == "Function") {
+      _errorReporter.reportErrorForNode(
+          HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION, node.name);
+    }
+
+    if (extendsClause != null) {
+      InterfaceType superclassType = _enclosingClass.supertype;
+      ClassElement superclassElement = superclassType?.element;
+      if (superclassElement != null && superclassElement.name == "Function") {
+        _errorReporter.reportErrorForNode(
+            HintCode.DEPRECATED_EXTENDS_FUNCTION, extendsClause.superclass);
+      }
+    }
+
+    if (withClause != null) {
+      for (TypeName type in withClause.mixinTypes) {
+        Element mixinElement = type.name.staticElement;
+        if (mixinElement != null && mixinElement.name == "Function") {
+          _errorReporter.reportErrorForNode(
+              HintCode.DEPRECATED_MIXIN_FUNCTION, type);
+        }
+      }
+    }
+  }
+
+  /**
    * Verify that the enclosing class does not have an instance member with the
    * same name as the given static [method] declaration.
    *
@@ -5195,6 +5231,26 @@
     }
   }
 
+  void _checkForNotInstantiatedBound(TypeAnnotation node) {
+    if (!_options.strongMode || node == null) {
+      return;
+    }
+
+    if (node is TypeName) {
+      if (node.typeArguments == null) {
+        DartType type = node.type;
+        if (type is InterfaceType && type.element.typeParameters.isNotEmpty) {
+          _errorReporter.reportErrorForNode(
+              StrongModeCode.NOT_INSTANTIATED_BOUND, node, [type]);
+        }
+      } else {
+        node.typeArguments.arguments.forEach(_checkForNotInstantiatedBound);
+      }
+    } else {
+      throw new UnimplementedError('${node.runtimeType}');
+    }
+  }
+
   /**
    * Verify the given operator-method [declaration], does not have an optional
    * parameter. This method assumes that the method declaration was tested to be
@@ -6099,73 +6155,56 @@
    *
    * See [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS].
    */
-  void _checkTypeArguments(Element element, TypeArgumentList typeArguments,
-      [DartType targetType]) {
-    if (element == null || typeArguments == null) {
+  void _checkTypeArguments(InvocationExpression node) {
+    NodeList<TypeAnnotation> typeArgumentList = node.typeArguments?.arguments;
+    if (typeArgumentList == null) {
       return;
     }
-    void reportError(TypeAnnotation argument, DartType argumentType,
-        DartType parameterType) {
-      _errorReporter.reportTypeErrorForNode(
-          StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
-          argument,
-          [argumentType, parameterType]);
-    }
 
-    if (element is FunctionTypedElement) {
-      _checkTypeArgumentsAgainstBounds(
-          element.typeParameters, typeArguments, targetType, reportError);
-    } else if (element is ClassElement) {
-      _checkTypeArgumentsAgainstBounds(
-          element.typeParameters, typeArguments, targetType, reportError);
-    } else if (element is ParameterElement || element is LocalVariableElement) {
-      // TODO(brianwilkerson) Implement this case
-    } else {
-      print('Unhandled element type: ${element.runtimeType}');
+    var genericType = node.function.staticType;
+    var instantiatedType = node.staticInvokeType;
+    if (genericType is FunctionType && instantiatedType is FunctionType) {
+      var fnTypeParams =
+          TypeParameterTypeImpl.getTypes(genericType.typeFormals);
+      var typeArgs = typeArgumentList.map((t) => t.type).toList();
+
+      for (int i = 0, len = math.min(typeArgs.length, fnTypeParams.length);
+          i < len;
+          i++) {
+        // Check the `extends` clause for the type parameter, if any.
+        //
+        // Also substitute to handle cases like this:
+        //
+        //     <TFrom, TTo extends TFrom>
+        //     <TFrom, TTo extends Iterable<TFrom>>
+        //     <T extends Clonable<T>>
+        //
+        DartType argType = typeArgs[i];
+        DartType bound =
+            fnTypeParams[i].bound.substitute2(typeArgs, fnTypeParams);
+        if (!_typeSystem.isSubtypeOf(argType, bound)) {
+          _errorReporter.reportTypeErrorForNode(
+              StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
+              typeArgumentList[i],
+              [argType, bound]);
+        }
+      }
     }
   }
 
-  void _checkTypeArgumentsAgainstBounds(
-      List<TypeParameterElement> typeParameters,
-      TypeArgumentList typeArgumentList,
-      DartType targetType,
-      void reportError(TypeAnnotation argument, DartType argumentType,
-          DartType parameterType)) {
-    NodeList<TypeAnnotation> typeArguments = typeArgumentList.arguments;
-    int argumentsLength = typeArguments.length;
-    int maxIndex = math.min(typeParameters.length, argumentsLength);
-
-    bool shouldSubstitute =
-        argumentsLength != 0 && argumentsLength == typeParameters.length;
-    List<DartType> argumentTypes = shouldSubstitute
-        ? typeArguments.map((TypeAnnotation type) => type.type).toList()
-        : null;
-    List<DartType> parameterTypes = shouldSubstitute
-        ? typeParameters
-            .map((TypeParameterElement element) => element.type)
-            .toList()
-        : null;
-    List<DartType> targetTypeParameterTypes = null;
-    for (int i = 0; i < maxIndex; i++) {
-      TypeAnnotation argument = typeArguments[i];
-      DartType argType = argument.type;
-      DartType boundType = typeParameters[i].bound;
-      if (argType != null && boundType != null) {
-        if (targetType is ParameterizedType) {
-          if (targetTypeParameterTypes == null) {
-            targetTypeParameterTypes = targetType.typeParameters
-                .map((TypeParameterElement element) => element.type)
-                .toList();
-          }
-          boundType = boundType.substitute2(
-              targetType.typeArguments, targetTypeParameterTypes);
-        }
-        if (shouldSubstitute) {
-          boundType = boundType.substitute2(argumentTypes, parameterTypes);
-        }
-        if (!_typeSystem.isSubtypeOf(argType, boundType)) {
-          reportError(argument, argType, boundType);
-        }
+  void _checkUseOfCovariantInParameters(FormalParameterList node) {
+    AstNode parent = node.parent;
+    if (parent is MethodDeclaration && !parent.isStatic) {
+      return;
+    }
+    NodeList<FormalParameter> parameters = node.parameters;
+    int length = parameters.length;
+    for (int i = 0; i < length; i++) {
+      FormalParameter parameter = parameters[i];
+      Token keyword = parameter.covariantKeyword;
+      if (keyword != null) {
+        _errorReporter.reportErrorForToken(
+            CompileTimeErrorCode.INVALID_USE_OF_COVARIANT, keyword);
       }
     }
   }
diff --git a/pkg/analyzer/lib/src/generated/gn.dart b/pkg/analyzer/lib/src/generated/gn.dart
new file mode 100644
index 0000000..ea19833
--- /dev/null
+++ b/pkg/analyzer/lib/src/generated/gn.dart
@@ -0,0 +1,255 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.src.generated.gn;
+
+import 'dart:collection';
+import 'dart:core';
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/util/fast_uri.dart';
+import 'package:path/path.dart';
+
+/**
+ * The [UriResolver] used to resolve `file` URIs in a [GnWorkspace].
+ */
+class GnFileUriResolver extends ResourceUriResolver {
+  /**
+   * The workspace associated with this resolver.
+   */
+  final GnWorkspace workspace;
+
+  /**
+   * Initialize a newly created resolver to be associated with the given
+   * [workspace].
+   */
+  GnFileUriResolver(GnWorkspace workspace)
+      : workspace = workspace,
+        super(workspace.provider);
+
+  @override
+  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
+    if (!ResourceUriResolver.isFileUri(uri)) {
+      return null;
+    }
+    String path = provider.pathContext.fromUri(uri);
+    File file = workspace.findFile(path);
+    if (file != null) {
+      return file.createSource(actualUri ?? uri);
+    }
+    return null;
+  }
+}
+
+/**
+ * The [UriResolver] used to resolve `package` URIs in a [GnWorkspace].
+ */
+class GnPackageUriResolver extends UriResolver {
+  /**
+   * The workspace associated with this resolver.
+   */
+  final GnWorkspace workspace;
+
+  /**
+   * The path context that should be used to manipulate file system paths.
+   */
+  final Context pathContext;
+
+  /**
+   * The map of package sources indexed by package name.
+   */
+  final Map<String, String> _packages;
+
+  /**
+   * The cache of absolute [Uri]s to [Source]s mappings.
+   */
+  final Map<Uri, Source> _sourceCache = new HashMap<Uri, Source>();
+
+  /**
+   * Initialize a newly created resolver to be associated with the given
+   * [workspace].
+   */
+  GnPackageUriResolver(GnWorkspace workspace)
+      : workspace = workspace,
+        pathContext = workspace.provider.pathContext,
+        _packages = workspace.packages;
+
+  @override
+  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
+    return _sourceCache.putIfAbsent(uri, () {
+      if (uri.scheme != 'package') {
+        return null;
+      }
+
+      String uriPath = uri.path;
+      int slash = uriPath.indexOf('/');
+
+      // If the path either starts with a slash or has no slash, it is invalid.
+      if (slash < 1) {
+        return null;
+      }
+
+      String packageName = uriPath.substring(0, slash);
+      String fileUriPart = uriPath.substring(slash + 1);
+      String filePath = fileUriPart.replaceAll('/', pathContext.separator);
+
+      if (!_packages.containsKey(packageName)) {
+        return null;
+      }
+      String packageBase = _packages[packageName];
+      String path = pathContext.join(packageBase, filePath);
+      File file = workspace.findFile(path);
+      return file?.createSource(uri);
+    });
+  }
+
+  @override
+  Uri restoreAbsolute(Source source) {
+    Context context = workspace.provider.pathContext;
+    String path = source.fullName;
+
+    if (!context.isWithin(workspace.root, path)) {
+      return null;
+    }
+
+    String package = _packages.keys.firstWhere(
+        (key) => context.isWithin(_packages[key], path),
+        orElse: () => null);
+
+    if (package == null) {
+      return null;
+    }
+
+    String sourcePath = context.relative(path, from: _packages[package]);
+
+    return FastUri.parse('package:$package/$sourcePath');
+  }
+}
+
+/**
+ * Information about a Gn workspace.
+ */
+class GnWorkspace {
+  /**
+   * The name of the directory that identifies the root of the workspace.
+   */
+  static const String _jiriRootName = '.jiri_root';
+
+  /**
+   * The resource provider used to access the file system.
+   */
+  final ResourceProvider provider;
+
+  /**
+   * The absolute workspace root path (the directory containing the `.jiri_root`
+   * directory).
+   */
+  final String root;
+
+  /**
+   * The map of package sources indexed by package name.
+   */
+  final Map<String, String> packages;
+
+  GnWorkspace._(this.provider, this.root, this.packages);
+
+  /**
+   * Return a map of package sources.
+   */
+  Map<String, List<Folder>> get packageMap {
+    Map<String, List<Folder>> result = new HashMap<String, List<Folder>>();
+    packages.forEach((package, sourceDir) {
+      result[package] = [provider.getFolder(sourceDir)];
+    });
+    return result;
+  }
+
+  /**
+   * Return the file with the given [absolutePath].
+   *
+   * Return `null` if the given [absolutePath] is not in the workspace [root].
+   */
+  File findFile(String absolutePath) {
+    try {
+      File writableFile = provider.getFile(absolutePath);
+      return writableFile;
+    } catch (_) {
+      return null;
+    }
+  }
+
+  /**
+   * Locate the output directory.
+   *
+   * Return `null` if it could not be found.
+   */
+  static String _getOutDirectory(ResourceProvider provider, String root) =>
+      provider
+          .getFolder('$root/out')
+          .getChildren()
+          .where((resource) => resource is Folder)
+          .map((resource) => resource as Folder)
+          .firstWhere((Folder folder) {
+        String baseName = basename(folder.path);
+        // TODO(pylaligand): find a better way to locate the proper directory.
+        return baseName.startsWith('debug') || baseName.startsWith('release');
+      }, orElse: () => null)?.path;
+
+  /**
+   * Return a map of package source locations indexed by package name.
+   */
+  static Map<String, String> _getPackages(
+      ResourceProvider provider, String outDirectory) {
+    String packagesDir = '$outDirectory/gen/dart.sources';
+    Map<String, String> result = new HashMap<String, String>();
+    provider
+        .getFolder(packagesDir)
+        .getChildren()
+        .where((resource) => resource is File)
+        .map((resource) => resource as File)
+        .forEach((file) {
+      String packageName = basename(file.path);
+      String source = file.readAsStringSync();
+      result[packageName] = source;
+    });
+    return result;
+  }
+
+  /**
+   * Find the Gn workspace that contains the given [path].
+   *
+   * Return `null` if a workspace markers, such as the `.jiri_root` directory
+   * cannot be found.
+   */
+  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 absolute: $path');
+    }
+    path = context.normalize(path);
+
+    Folder folder = provider.getFolder(path);
+    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) {
+        String root = folder.path;
+        String outDirectory = _getOutDirectory(provider, root);
+        Map<String, String> packages = _getPackages(provider, outDirectory);
+        return new GnWorkspace._(provider, root, packages);
+      }
+
+      // Go up the folder.
+      folder = parent;
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index 994f553..51eead8 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -126,7 +126,7 @@
 }
 
 @deprecated
-abstract class Enum<E extends Enum> implements Comparable<E> {
+abstract class Enum<E extends Enum<E>> implements Comparable<E> {
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
 
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index e470237..b8906c1 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -89,6 +89,12 @@
   Token constKeyword;
 
   /**
+   * 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.
    */
@@ -1262,6 +1268,7 @@
             return parseInitializedIdentifierList(
                 commentAndMetadata,
                 modifiers.staticKeyword,
+                modifiers.covariantKeyword,
                 _validateModifiersForField(modifiers),
                 returnType);
           }
@@ -1326,13 +1333,9 @@
         return parseOperator(
             commentAndMetadata, modifiers.externalKeyword, null);
       }
-      Token keyword = modifiers.varKeyword;
-      if (keyword == null) {
-        keyword = modifiers.finalKeyword;
-      }
-      if (keyword == null) {
-        keyword = modifiers.constKeyword;
-      }
+      Token keyword = modifiers.varKeyword ??
+          modifiers.finalKeyword ??
+          modifiers.constKeyword;
       if (keyword != null) {
         //
         // We appear to have found an incomplete field declaration.
@@ -1341,13 +1344,15 @@
         VariableDeclaration variable = astFactory.variableDeclaration(
             createSyntheticIdentifier(), null, null);
         List<VariableDeclaration> variables = <VariableDeclaration>[variable];
-        return astFactory.fieldDeclaration(
+        FieldDeclarationImpl field = astFactory.fieldDeclaration(
             commentAndMetadata.comment,
             commentAndMetadata.metadata,
             null,
             astFactory.variableDeclarationList(
                 null, null, keyword, null, variables),
             _expect(TokenType.SEMICOLON));
+        field.covariantKeyword = modifiers.covariantKeyword;
+        return field;
       }
       _reportErrorForToken(
           ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken);
@@ -1370,7 +1375,11 @@
             createSyntheticIdentifier(isDeclaration: true),
             null,
             astFactory.formalParameterList(
-                null, <FormalParameter>[], null, null, null),
+                _createSyntheticToken(TokenType.OPEN_PAREN),
+                <FormalParameter>[],
+                null,
+                null,
+                _createSyntheticToken(TokenType.CLOSE_PAREN)),
             astFactory
                 .emptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON)));
       }
@@ -1426,8 +1435,12 @@
         _reportErrorForCurrentToken(
             ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE);
       }
-      return parseInitializedIdentifierList(commentAndMetadata,
-          modifiers.staticKeyword, _validateModifiersForField(modifiers), null);
+      return parseInitializedIdentifierList(
+          commentAndMetadata,
+          modifiers.staticKeyword,
+          modifiers.covariantKeyword,
+          _validateModifiersForField(modifiers),
+          null);
     } else if (keyword == Keyword.TYPEDEF) {
       _reportErrorForCurrentToken(ParserErrorCode.TYPEDEF_IN_CLASS);
       // TODO(brianwilkerson) We don't currently have any way to capture the
@@ -1467,6 +1480,7 @@
         return parseInitializedIdentifierList(
             commentAndMetadata,
             modifiers.staticKeyword,
+            modifiers.covariantKeyword,
             _validateModifiersForField(modifiers),
             type);
       }
@@ -1491,6 +1505,7 @@
         return parseInitializedIdentifierList(
             commentAndMetadata,
             modifiers.staticKeyword,
+            modifiers.covariantKeyword,
             _validateModifiersForField(modifiers),
             type);
       } finally {
@@ -1536,8 +1551,12 @@
       return parseGetter(commentAndMetadata, modifiers.externalKeyword,
           modifiers.staticKeyword, type);
     }
-    return parseInitializedIdentifierList(commentAndMetadata,
-        modifiers.staticKeyword, _validateModifiersForField(modifiers), type);
+    return parseInitializedIdentifierList(
+        commentAndMetadata,
+        modifiers.staticKeyword,
+        modifiers.covariantKeyword,
+        _validateModifiersForField(modifiers),
+        type);
   }
 
   /**
@@ -3546,8 +3565,8 @@
    * that has already been parsed, or `null` if 'var' was provided. Return the
    * getter that was parsed.
    *
-   *     ?? ::=
-   *         'static'? ('var' | type) initializedIdentifierList ';'
+   *     declaration ::=
+   *         ('static' | 'covariant')? ('var' | type) initializedIdentifierList ';'
    *       | 'final' type? initializedIdentifierList ';'
    *
    *     initializedIdentifierList ::=
@@ -3559,16 +3578,19 @@
   FieldDeclaration parseInitializedIdentifierList(
       CommentAndMetadata commentAndMetadata,
       Token staticKeyword,
+      Token covariantKeyword,
       Token keyword,
       TypeAnnotation type) {
     VariableDeclarationList fieldList =
         parseVariableDeclarationListAfterType(null, keyword, type);
-    return astFactory.fieldDeclaration(
+    FieldDeclarationImpl field = astFactory.fieldDeclaration(
         commentAndMetadata.comment,
         commentAndMetadata.metadata,
         staticKeyword,
         fieldList,
         _expect(TokenType.SEMICOLON));
+    field.covariantKeyword = covariantKeyword;
+    return field;
   }
 
   /**
@@ -3825,6 +3847,14 @@
         } else {
           modifiers.constKeyword = getAndAdvance();
         }
+      } else if (keyword == Keyword.COVARIANT) {
+        if (modifiers.covariantKeyword != null) {
+          _reportErrorForCurrentToken(
+              ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+          _advance();
+        } else {
+          modifiers.covariantKeyword = getAndAdvance();
+        }
       } else if (keyword == Keyword.EXTERNAL) {
         if (modifiers.externalKeyword != null) {
           _reportErrorForCurrentToken(
@@ -4110,7 +4140,19 @@
    */
   NormalFormalParameter parseNormalFormalParameter(
       {bool inFunctionType: false}) {
+    Token covariantKeyword;
     CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
+    if (_matchesKeyword(Keyword.COVARIANT)) {
+      // Check to ensure that 'covariant' isn't being used as the parameter name.
+      Token next = _peek();
+      if (_tokenMatchesKeyword(next, Keyword.FINAL) ||
+          _tokenMatchesKeyword(next, Keyword.CONST) ||
+          _tokenMatchesKeyword(next, Keyword.VAR) ||
+          _tokenMatchesKeyword(next, Keyword.THIS) ||
+          _tokenMatchesIdentifier(next)) {
+        covariantKeyword = getAndAdvance();
+      }
+    }
     FinalConstVarOrType holder = parseFinalConstVarOrType(!inFunctionType,
         inFunctionType: inFunctionType);
     Token thisKeyword = null;
@@ -4120,8 +4162,14 @@
       period = _expect(TokenType.PERIOD);
     }
     if (!_matchesIdentifier() && inFunctionType) {
-      return astFactory.simpleFormalParameter(commentAndMetadata.comment,
-          commentAndMetadata.metadata, holder.keyword, holder.type, null);
+      SimpleFormalParameterImpl parameter = astFactory.simpleFormalParameter(
+          commentAndMetadata.comment,
+          commentAndMetadata.metadata,
+          holder.keyword,
+          holder.type,
+          null);
+      parameter.covariantKeyword = covariantKeyword;
+      return parameter;
     }
     SimpleIdentifier identifier = parseSimpleIdentifier();
     TypeParameterList typeParameters = _parseGenericMethodTypeParameters();
@@ -4136,16 +4184,20 @@
         if (enableNnbd && _matches(TokenType.QUESTION)) {
           question = getAndAdvance();
         }
-        return astFactory.functionTypedFormalParameter(
-            commentAndMetadata.comment,
-            commentAndMetadata.metadata,
-            holder.type,
-            astFactory.simpleIdentifier(identifier.token, isDeclaration: true),
-            typeParameters,
-            parameters,
-            question: question);
+        FunctionTypedFormalParameterImpl parameter =
+            astFactory.functionTypedFormalParameter(
+                commentAndMetadata.comment,
+                commentAndMetadata.metadata,
+                holder.type,
+                astFactory.simpleIdentifier(identifier.token,
+                    isDeclaration: true),
+                typeParameters,
+                parameters,
+                question: question);
+        parameter.covariantKeyword = covariantKeyword;
+        return parameter;
       } else {
-        return astFactory.fieldFormalParameter(
+        FieldFormalParameterImpl parameter = astFactory.fieldFormalParameter(
             commentAndMetadata.comment,
             commentAndMetadata.metadata,
             holder.keyword,
@@ -4155,6 +4207,8 @@
             identifier,
             typeParameters,
             parameters);
+        parameter.covariantKeyword = covariantKeyword;
+        return parameter;
       }
     } else if (typeParameters != null) {
       // TODO(brianwilkerson) Report an error. It looks like a function-typed
@@ -4176,7 +4230,7 @@
       // TODO(brianwilkerson) If there are type parameters but no parameters,
       // should we create a synthetic empty parameter list here so we can
       // capture the type parameters?
-      return astFactory.fieldFormalParameter(
+      FieldFormalParameterImpl parameter = astFactory.fieldFormalParameter(
           commentAndMetadata.comment,
           commentAndMetadata.metadata,
           holder.keyword,
@@ -4186,13 +4240,17 @@
           identifier,
           null,
           null);
+      parameter.covariantKeyword = covariantKeyword;
+      return parameter;
     }
-    return astFactory.simpleFormalParameter(
+    SimpleFormalParameterImpl parameter = astFactory.simpleFormalParameter(
         commentAndMetadata.comment,
         commentAndMetadata.metadata,
         holder.keyword,
         type,
         astFactory.simpleIdentifier(identifier.token, isDeclaration: true));
+    parameter.covariantKeyword = covariantKeyword;
+    return parameter;
   }
 
   /**
@@ -8132,6 +8190,10 @@
       _reportErrorForToken(
           ParserErrorCode.ABSTRACT_CLASS_MEMBER, modifiers.abstractKeyword);
     }
+    if (modifiers.covariantKeyword != null) {
+      _reportErrorForToken(
+          ParserErrorCode.COVARIANT_CONSTRUCTOR, modifiers.covariantKeyword);
+    }
     if (modifiers.finalKeyword != null) {
       _reportErrorForToken(
           ParserErrorCode.FINAL_CONSTRUCTOR, modifiers.finalKeyword);
@@ -8204,10 +8266,15 @@
           ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword);
     }
     Token staticKeyword = modifiers.staticKeyword;
+    Token covariantKeyword = modifiers.covariantKeyword;
     Token constKeyword = modifiers.constKeyword;
     Token finalKeyword = modifiers.finalKeyword;
     Token varKeyword = modifiers.varKeyword;
     if (constKeyword != null) {
+      if (covariantKeyword != null) {
+        _reportErrorForToken(
+            ParserErrorCode.CONST_AND_COVARIANT, covariantKeyword);
+      }
       if (finalKeyword != null) {
         _reportErrorForToken(ParserErrorCode.CONST_AND_FINAL, finalKeyword);
       }
@@ -8218,16 +8285,28 @@
         _reportErrorForToken(ParserErrorCode.STATIC_AFTER_CONST, staticKeyword);
       }
     } else if (finalKeyword != null) {
+      if (covariantKeyword != null) {
+        _reportErrorForToken(
+            ParserErrorCode.FINAL_AND_COVARIANT, covariantKeyword);
+      }
       if (varKeyword != null) {
         _reportErrorForToken(ParserErrorCode.FINAL_AND_VAR, varKeyword);
       }
       if (staticKeyword != null && finalKeyword.offset < staticKeyword.offset) {
         _reportErrorForToken(ParserErrorCode.STATIC_AFTER_FINAL, staticKeyword);
       }
-    } else if (varKeyword != null &&
-        staticKeyword != null &&
-        varKeyword.offset < staticKeyword.offset) {
-      _reportErrorForToken(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword);
+    } else if (varKeyword != null) {
+      if (staticKeyword != null && varKeyword.offset < staticKeyword.offset) {
+        _reportErrorForToken(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword);
+      }
+      if (covariantKeyword != null &&
+          varKeyword.offset < covariantKeyword.offset) {
+        _reportErrorForToken(
+            ParserErrorCode.COVARIANT_AFTER_VAR, covariantKeyword);
+      }
+    }
+    if (covariantKeyword != null && staticKeyword != null) {
+      _reportErrorForToken(ParserErrorCode.COVARIANT_AND_STATIC, staticKeyword);
     }
     return Token.lexicallyFirst([constKeyword, finalKeyword, varKeyword]);
   }
@@ -8261,6 +8340,10 @@
       _reportErrorForToken(
           ParserErrorCode.CONST_METHOD, modifiers.constKeyword);
     }
+    if (modifiers.covariantKeyword != null) {
+      _reportErrorForToken(
+          ParserErrorCode.COVARIANT_MEMBER, modifiers.covariantKeyword);
+    }
     if (modifiers.factoryKeyword != null) {
       _reportErrorForToken(
           ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword);
@@ -8318,6 +8401,10 @@
    * declaration.
    */
   void _validateModifiersForTopLevelDeclaration(Modifiers modifiers) {
+    if (modifiers.covariantKeyword != null) {
+      _reportErrorForToken(ParserErrorCode.COVARIANT_TOP_LEVEL_DECLARATION,
+          modifiers.covariantKeyword);
+    }
     if (modifiers.factoryKeyword != null) {
       _reportErrorForToken(ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION,
           modifiers.factoryKeyword);
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 60c2700..32d24bf 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -4193,13 +4193,7 @@
         return;
       }
 
-      if (context is FutureUnionType) {
-        // Try and match the Future type first.
-        if (_typeSystem.isSubtypeOf(inferred, context.futureOfType) ||
-            _typeSystem.isSubtypeOf(inferred, context.type)) {
-          setType(node, inferred);
-        }
-      } else if (_typeSystem.isSubtypeOf(inferred, context)) {
+      if (_typeSystem.isSubtypeOf(inferred, context)) {
         setType(node, inferred);
       }
     } else {
@@ -4362,17 +4356,17 @@
   static DartType getContext(AstNode node) => node?.getProperty(_typeProperty);
 
   /**
-   * Look for a single contextual type attached to [node], and returns the type
-   * if found, otherwise null.
-   *
-   * If [node] has a contextual union type like `T | Future<T>` this will
-   * simplify it to only return `T`. If the caller can handle a union type,
-   * [getContext] should be used instead.
-   */
+    * Look for a single contextual type attached to [node], and returns the type
+    * if found, otherwise null.
+    *
+    * If [node] has a contextual union type like `T | Future<T>` this will
+    * simplify it to only return `T`. If the caller can handle a union type,
+    * [getContext] should be used instead.
+    */
   static DartType getType(AstNode node) {
     DartType t = getContext(node);
-    if (t is FutureUnionType) {
-      return t.type;
+    if (t is InterfaceType && t.isDartAsyncFutureOr) {
+      return t.typeArguments[0]; // The T in FutureOr<T>
     }
     return t;
   }
@@ -4380,15 +4374,19 @@
   /**
    * Like [getContext] but expands a union type into a list of types.
    */
-  static Iterable<DartType> getTypes(AstNode node) {
+  Iterable<DartType> getTypes(AstNode node) {
     DartType t = getContext(node);
     if (t == null) {
       return DartType.EMPTY_LIST;
     }
-    if (t is FutureUnionType) {
-      return t.types;
+    if (t is InterfaceType && t.isDartAsyncFutureOr) {
+      var tArg = t.typeArguments[0]; // The T in FutureOr<T>
+      return [
+        _typeProvider.futureType.instantiate([tArg]),
+        tArg
+      ];
     }
-    return <DartType>[t];
+    return [t];
   }
 
   /**
@@ -5219,22 +5217,6 @@
   }
 
   /**
-   * Returns true if this method is `Future.then` or an override thereof.
-   *
-   * If so we will apply special typing rules in strong mode, to handle the
-   * implicit union of `S | Future<S>`
-   */
-  bool isFutureThen(Element element) {
-    // If we are a method named then
-    if (element is MethodElement && element.name == 'then') {
-      DartType type = element.enclosingElement.type;
-      // On Future or a subtype, then we're good.
-      return (type.isDartAsyncFuture || isSubtypeOfFuture(type));
-    }
-    return false;
-  }
-
-  /**
    * Returns true if this type is any subtype of the built in Future type.
    */
   bool isSubtypeOfFuture(DartType type) =>
@@ -5536,8 +5518,7 @@
   Object visitAwaitExpression(AwaitExpression node) {
     DartType contextType = InferenceContext.getContext(node);
     if (contextType != null) {
-      var futureUnion =
-          FutureUnionType.from(contextType, typeProvider, typeSystem);
+      var futureUnion = _createFutureOr(contextType);
       InferenceContext.setType(node.expression, futureUnion);
     }
     return super.visitAwaitExpression(node);
@@ -6078,29 +6059,8 @@
               matchFunctionTypeParameters(node.typeParameters, functionType);
           if (functionType is FunctionType) {
             _inferFormalParameterList(node.parameters, functionType);
-
-            DartType returnType;
-            ParameterElement parameterElement =
-                resolutionMap.staticParameterElementForExpression(node);
-            if (isFutureThen(parameterElement?.enclosingElement)) {
-              var futureThenType =
-                  InferenceContext.getContext(node.parent) as FunctionType;
-
-              // Pretend the return type of Future<T>.then<S> first parameter is
-              //
-              //     T -> (S | Future<S>)
-              //
-              // We can't represent this in Dart so we populate it here during
-              // inference.
-              var typeParamS =
-                  futureThenType.returnType.flattenFutures(typeSystem);
-              returnType =
-                  FutureUnionType.from(typeParamS, typeProvider, typeSystem);
-            } else {
-              returnType = _computeReturnOrYieldType(functionType.returnType);
-            }
-
-            InferenceContext.setType(node.body, returnType);
+            InferenceContext.setType(
+                node.body, _computeReturnOrYieldType(functionType.returnType));
           }
         }
         super.visitFunctionExpression(node);
@@ -6229,7 +6189,7 @@
       // TODO(jmesserly): if we support union types for real, `new C<Ti | Tj>`
       // will become a valid possibility. Right now the only allowed union is
       // `T | Future<T>` so we can take a simple approach.
-      for (var contextType in InferenceContext.getTypes(node)) {
+      for (var contextType in inferenceContext.getTypes(node)) {
         if (contextType is InterfaceType &&
             contextType.typeArguments != null &&
             contextType.typeArguments.isNotEmpty) {
@@ -6665,12 +6625,23 @@
       }
       // async functions expect `Future<T> | T`
       var futureTypeParam = declaredType.flattenFutures(typeSystem);
-      return FutureUnionType.from(futureTypeParam, typeProvider, typeSystem);
+      return _createFutureOr(futureTypeParam);
     }
     return declaredType;
   }
 
   /**
+   * Creates a union of `T | Future<T>`, unless `T` is already a
+   * future-union, in which case it simply returns `T`.
+   */
+  DartType _createFutureOr(DartType type) {
+    if (type.isDartAsyncFutureOr) {
+      return type;
+    }
+    return typeProvider.futureOrType.instantiate([type]);
+  }
+
+  /**
    * The given expression is the expression used to compute the iterator for a
    * for-each statement. Attempt to compute the type of objects that will be
    * assigned to the loop variable and return that type. Return `null` if the
@@ -8295,8 +8266,23 @@
     }
     DartType type = null;
     if (element is ClassElement) {
-      _setElement(typeName, element);
       type = element.type;
+      // In non-strong mode `FutureOr<T>` is treated as `dynamic`
+      if (!typeSystem.isStrong && type.isDartAsyncFutureOr) {
+        type = dynamicType;
+        _setElement(typeName, type.element);
+        typeName.staticType = type;
+        node.type = type;
+        if (argumentList != null) {
+          NodeList<TypeAnnotation> arguments = argumentList.arguments;
+          if (arguments.length != 1) {
+            reportErrorForNode(_getInvalidTypeParametersErrorCode(node), node,
+                [typeName.name, 1, arguments.length]);
+          }
+        }
+        return;
+      }
+      _setElement(typeName, element);
     } else if (element is FunctionTypeAliasElement) {
       _setElement(typeName, element);
       type = element.type;
@@ -8384,7 +8370,12 @@
       }
       type = typeSystem.instantiateType(type, typeArguments);
     } else {
-      type = typeSystem.instantiateToBounds(type);
+      List<bool> hasError = [false];
+      type = typeSystem.instantiateToBounds(type, hasError: hasError);
+      if (hasError[0]) {
+        errorListener.onError(new AnalysisError(source, node.offset,
+            node.length, StrongModeCode.NO_DEFAULT_BOUNDS));
+      }
     }
     typeName.staticType = type;
     node.type = type;
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index 9177b28..e46fe7d 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -21,7 +21,7 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
-import 'package:analyzer/src/summary/summary_sdk.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:path/path.dart' as pathos;
 
 /**
@@ -79,8 +79,10 @@
         bool strongMode = _analysisOptions?.strongMode ?? false;
         PackageBundle sdkBundle = getSummarySdkBundle(strongMode);
         if (sdkBundle != null) {
-          _analysisContext.resultProvider = new SdkSummaryResultProvider(
-              _analysisContext, sdkBundle, strongMode);
+          SummaryDataStore dataStore = new SummaryDataStore([]);
+          dataStore.addBundle(null, sdkBundle);
+          _analysisContext.resultProvider =
+              new InputPackagesResultProvider(_analysisContext, dataStore);
         }
       }
     }
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 8d9f708..a86bcde 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -811,7 +811,7 @@
       Expression target = node.realTarget;
       if (target != null) {
         DartType targetType = target.bestType;
-        if (_isAsyncFutureType(targetType)) {
+        if (targetType.isDartAsyncFuture) {
           // Future.then(closure) return type is:
           // 1) the returned Future type, if the closure returns a Future;
           // 2) Future<valueType>, if the closure returns a value.
@@ -1418,11 +1418,11 @@
       // TODO(brianwilkerson) Determine whether this can still happen.
       staticType2 = _dynamicType;
     }
+
     DartType staticType =
-        _typeSystem.getLeastUpperBound(staticType1, staticType2);
-    if (staticType == null) {
-      staticType = _dynamicType;
-    }
+        _typeSystem.getLeastUpperBound(staticType1, staticType2) ??
+            _dynamicType;
+
     _recordStaticType(node, staticType);
     DartType propagatedType1 = expr1.propagatedType;
     DartType propagatedType2 = expr2.propagatedType;
@@ -1519,6 +1519,9 @@
           : _typeProvider.iterableType;
       return genericType.instantiate(<DartType>[type]);
     } else if (body.isAsynchronous) {
+      if (type.isDartAsyncFutureOr) {
+        type = (type as InterfaceType).typeArguments[0];
+      }
       return _typeProvider.futureType
           .instantiate(<DartType>[type.flattenFutures(_typeSystem)]);
     } else {
@@ -1961,44 +1964,6 @@
           argTypes.add(argumentList.arguments[i].staticType);
         }
       }
-
-      // Special case Future<T>.then upwards inference. It has signature:
-      //
-      //     <S>(T -> (S | Future<S>)) -> Future<S>
-      //
-      // Based on the first argument type, we'll pick one of these signatures:
-      //
-      //     <S>(T -> S) -> Future<S>
-      //     <S>(T -> Future<S>) -> Future<S>
-      //
-      // ... and finish the inference using that.
-      if (argTypes.isNotEmpty && _resolver.isFutureThen(fnType.element)) {
-        var firstArgType = argTypes[0];
-        var firstParamType = paramTypes[0] as FunctionType;
-        if (firstArgType is FunctionType) {
-          var argReturnType = firstArgType.returnType;
-          // Skip the inference if we have the top type. It can only lead to
-          // worse inference. For example, this happens when the lambda returns
-          // S or Future<S> in a conditional.
-          if (!argReturnType.isObject && !argReturnType.isDynamic) {
-            DartType paramReturnType = fnType.typeFormals[0].type;
-            if (_resolver.isSubtypeOfFuture(argReturnType)) {
-              // Given an argument of (T) -> Future<S>, instantiate with <S>
-              paramReturnType =
-                  _typeProvider.futureType.instantiate([paramReturnType]);
-            }
-
-            // Adjust the expected parameter type to have this return type.
-            var function = new FunctionElementImpl(firstParamType.name, -1)
-              ..isSynthetic = true
-              ..shareParameters(firstParamType.parameters)
-              ..returnType = paramReturnType;
-            function.type = new FunctionTypeImpl(function);
-            // Use this as the expected 1st parameter type.
-            paramTypes[0] = function.type;
-          }
-        }
-      }
       return ts.inferGenericFunctionCall(fnType, paramTypes, argTypes,
           fnType.returnType, InferenceContext.getContext(node),
           errorReporter: _resolver.errorReporter, errorNode: errorNode);
@@ -2081,12 +2046,7 @@
     if (_strongMode &&
         (computedType.isDartCoreNull || computedType.isDynamic)) {
       DartType contextType = InferenceContext.getContext(body);
-      if (contextType is FutureUnionType) {
-        // TODO(jmesserly): can we do something better here?
-        computedType = body.isAsynchronous ? contextType.type : _dynamicType;
-      } else {
-        computedType = contextType ?? _dynamicType;
-      }
+      computedType = contextType ?? _dynamicType;
       recordInference = !computedType.isDynamic;
     }
 
@@ -2224,23 +2184,6 @@
   }
 
   /**
-   * Return `true` if the given [Type] is the `Future` form the 'dart:async'
-   * library.
-   */
-  bool _isAsyncFutureType(DartType type) =>
-      type is InterfaceType &&
-      type.name == "Future" &&
-      _isAsyncLibrary(type.element.library);
-
-  /**
-   * Return `true` if the given library is the 'dart:async' library.
-   *
-   * @param library the library being tested
-   * @return `true` if the library is 'dart:async'
-   */
-  bool _isAsyncLibrary(LibraryElement library) => library.name == "dart.async";
-
-  /**
    * Return `true` if the given library is the 'dart:html' library.
    *
    * @param library the library being tested
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index 9069137..d6ad245 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -230,12 +230,12 @@
       functionElement4(functionName, null, null, null, null);
 
   static FunctionElementImpl functionElement2(
-          String functionName, TypeDefiningElement returnElement) =>
-      functionElement3(functionName, returnElement, null, null);
+          String functionName, DartType returnType) =>
+      functionElement3(functionName, returnType, null, null);
 
   static FunctionElementImpl functionElement3(
       String functionName,
-      TypeDefiningElement returnElement,
+      DartType returnType,
       List<TypeDefiningElement> normalParameters,
       List<TypeDefiningElement> optionalParameters) {
     // We don't create parameter elements because we don't have parameter names
@@ -243,12 +243,7 @@
         new FunctionElementImpl(functionName, 0);
     FunctionTypeImpl functionType = new FunctionTypeImpl(functionElement);
     functionElement.type = functionType;
-    // return type
-    if (returnElement == null) {
-      functionElement.returnType = VoidTypeImpl.instance;
-    } else {
-      functionElement.returnType = returnElement.type;
-    }
+    functionElement.returnType = returnType ?? VoidTypeImpl.instance;
     // parameters
     int normalCount = normalParameters == null ? 0 : normalParameters.length;
     int optionalCount =
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 93dda91..2b6012a 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -20,8 +20,6 @@
     show AnalysisContext, AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
-import 'package:analyzer/src/generated/utilities_general.dart'
-    show JenkinsSmiHash;
 
 bool _isBottom(DartType t, {bool dynamicIsBottom: false}) {
   return (t.isDynamic && dynamicIsBottom) || t.isBottom || t.isDartCoreNull;
@@ -29,123 +27,15 @@
 
 bool _isTop(DartType t, {bool dynamicIsBottom: false}) {
   // TODO(leafp): Document the rules in play here
+  if (t.isDartAsyncFutureOr) {
+    return _isTop((t as InterfaceType).typeArguments[0]);
+  }
   return (t.isDynamic && !dynamicIsBottom) || t.isObject;
 }
 
 typedef bool _GuardedSubtypeChecker<T>(T t1, T t2, Set<Element> visited);
 
 /**
- * A special union type of `Future<T> | T` used for Strong Mode inference.
- */
-class FutureUnionType extends TypeImpl {
-  // TODO(jmesserly): a Set would be better.
-  //
-  // For now we know `Future<T> | T` is the only valid use, so we can rely on
-  // the order, which simplifies some things.
-  //
-  // This will need clean up before this can function as a real union type.
-  final List<DartType> _types;
-
-  /**
-   * Creates a union of `Future<T> | T`.
-   */
-  FutureUnionType._(DartType type, TypeProvider provider, TypeSystem system)
-      : _types = [
-          provider.futureType.instantiate([type]),
-          type
-        ],
-        super(null, null);
-
-  DartType get futureOfType => _types[0];
-
-  @override
-  int get hashCode {
-    int hash = 0;
-    for (var t in types) {
-      hash = JenkinsSmiHash.combine(hash, t.hashCode);
-    }
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  DartType get type => _types[1];
-
-  Iterable<DartType> get types => _types;
-
-  @override
-  bool operator ==(Object obj) {
-    if (obj is FutureUnionType) {
-      if (identical(obj, this)) return true;
-      return types.length == obj.types.length &&
-          types.toSet().containsAll(obj.types);
-    }
-    return false;
-  }
-
-  @override
-  void appendTo(StringBuffer buffer) {
-    buffer.write('(');
-    for (int i = 0; i < _types.length; i++) {
-      if (i != 0) {
-        buffer.write(' | ');
-      }
-      (_types[i] as TypeImpl).appendTo(buffer);
-    }
-    buffer.write(')');
-  }
-
-  @override
-  bool isMoreSpecificThan(DartType type,
-          [bool withDynamic = false, Set<Element> visitedElements]) =>
-      throw new UnsupportedError(
-          'Future unions are not part of the Dart 1 type system');
-
-  @override
-  TypeImpl pruned(List<FunctionTypeAliasElement> prune) =>
-      throw new UnsupportedError('Future unions are not substituted');
-
-  @override
-  DartType substitute2(List<DartType> args, List<DartType> params,
-          [List<FunctionTypeAliasElement> prune]) =>
-      throw new UnsupportedError('Future unions are not used in typedefs');
-
-  /**
-   * Creates a union of `T | Future<T>`, unless `T` is already a future or a
-   * future-union, in which case it simply returns `T`.
-   *
-   * Conceptually this is used as the inverse of the `flatten(T)` operation,
-   * defined as:
-   *
-   * - `flatten(Future<T>) -> T`
-   * - `flatten(T) -> T`
-   *
-   * Thus the inverse will give us `T | Future<T>`.
-   *
-   * If [type] is top (dynamic or Object) then the resulting union type is
-   * equivalent to top, so we simply return it.
-   *
-   * For a similar reason `Future<T> | Future<Future<T>>` is equivalent to just
-   * `Future<T>`, so we return it. Note that it is not possible to get a
-   * `Future<T>` as a result of `flatten`, so a this case likely indicates a
-   * type error in the code, but it will be reported elsewhere.
-   */
-  static DartType from(
-      DartType type, TypeProvider provider, TypeSystem system) {
-    if (_isTop(type)) {
-      return type;
-    }
-    if (!identical(type, type.flattenFutures(system))) {
-      // As noted above, this most likely represents erroneous input.
-      return type;
-    }
-
-    if (type is FutureUnionType) {
-      return type;
-    }
-    return new FutureUnionType._(type, provider, system);
-  }
-}
-
-/**
  * Implementation of [TypeSystem] using the strong mode rules.
  * https://github.com/dart-lang/dev_compiler/blob/master/STRONG_MODE.md
  */
@@ -173,30 +63,7 @@
   }
 
   @override
-  DartType tryPromoteToType(DartType to, DartType from) {
-    // Allow promoting to a subtype, for example:
-    //
-    //     f(Base b) {
-    //       if (b is SubTypeOfBase) {
-    //         // promote `b` to SubTypeOfBase for this block
-    //       }
-    //     }
-    //
-    // This allows the variable to be used wherever the supertype (here `Base`)
-    // is expected, while gaining a more precise type.
-    if (isSubtypeOf(to, from)) {
-      return to;
-    }
-    // For a type parameter `T extends U`, allow promoting the upper bound
-    // `U` to `S` where `S <: U`, yielding a type parameter `T extends S`.
-    if (from is TypeParameterType) {
-      if (isSubtypeOf(to, from.resolveToBound(DynamicTypeImpl.instance))) {
-        return new TypeParameterMember(from.element, null, to).type;
-      }
-    }
-
-    return null;
-  }
+  bool get isStrong => true;
 
   @override
   FunctionType functionTypeToConcreteType(FunctionType t) {
@@ -438,42 +305,84 @@
   /**
    * Given a [DartType] [type], if [type] is an uninstantiated
    * parameterized type then instantiate the parameters to their
-   * bounds. Specifically, if [type] is of the form
-   * `<T0 extends B0, ... Tn extends Bn>.F` or
-   * `class C<T0 extends B0, ... Tn extends Bn> {...}`
-   * (where Bi is implicitly dynamic if absent),
-   * compute `{I0/T0, ..., In/Tn}F or C<I0, ..., In>` respectively
-   * where I_(i+1) = {I0/T0, ..., Ii/Ti, dynamic/T_(i+1)}B_(i+1).
-   * That is, we instantiate the generic with its bounds, replacing
-   * each Ti in Bi with dynamic to get Ii, and then replacing Ti with
-   * Ii in all of the remaining bounds.
+   * bounds. See the issue for the algorithm description.
+   *
+   * https://github.com/dart-lang/sdk/issues/27526#issuecomment-260021397
+   *
+   * TODO(scheglov) Move this method to elements for classes, typedefs,
+   * and generic functions; compute lazily and cache.
    */
-  DartType instantiateToBounds(DartType type) {
+  DartType instantiateToBounds(DartType type, {List<bool> hasError}) {
     List<TypeParameterElement> typeFormals = typeFormalsAsElements(type);
     int count = typeFormals.length;
     if (count == 0) {
       return type;
     }
 
-    // We build up a substitution replacing bound parameters with
-    // their instantiated bounds, {substituted/variables}
-    List<DartType> substituted = new List<DartType>();
-    List<DartType> variables = new List<DartType>();
-    for (int i = 0; i < count; i++) {
-      TypeParameterElement param = typeFormals[i];
-      DartType bound = param.bound ?? DynamicTypeImpl.instance;
-      DartType variable = param.type;
-      // For each Ti extends Bi, first compute Ii by replacing
-      // Ti in Bi with dynamic (simultaneously replacing all
-      // of the previous Tj (j < i) with their instantiated bounds.
-      substituted.add(DynamicTypeImpl.instance);
-      variables.add(variable);
-      // Now update the substitution to replace Ti with Ii instead
-      // of dynamic in subsequent rounds.
-      substituted[i] = bound.substitute2(substituted, variables);
+    Set<TypeParameterType> all = new Set<TypeParameterType>();
+    Map<TypeParameterType, DartType> defaults = {}; // all ground
+    Map<TypeParameterType, DartType> partials = {}; // not ground
+
+    for (TypeParameterElement typeParameterElement in typeFormals) {
+      TypeParameterType typeParameter = typeParameterElement.type;
+      all.add(typeParameter);
+      if (typeParameter.bound == null) {
+        defaults[typeParameter] = DynamicTypeImpl.instance;
+      } else {
+        partials[typeParameter] = typeParameter.bound;
+      }
     }
 
-    return instantiateType(type, substituted);
+    List<TypeParameterType> getFreeParameters(DartType type) {
+      List<TypeParameterType> parameters = null;
+
+      void appendParameters(DartType type) {
+        if (type is TypeParameterType && all.contains(type)) {
+          parameters ??= <TypeParameterType>[];
+          parameters.add(type);
+        } else if (type is ParameterizedType) {
+          type.typeArguments.forEach(appendParameters);
+        }
+      }
+
+      appendParameters(type);
+      return parameters;
+    }
+
+    bool hasProgress = true;
+    while (hasProgress) {
+      hasProgress = false;
+      for (TypeParameterType parameter in partials.keys) {
+        DartType value = partials[parameter];
+        List<TypeParameterType> freeParameters = getFreeParameters(value);
+        if (freeParameters == null) {
+          defaults[parameter] = value;
+          partials.remove(parameter);
+          hasProgress = true;
+          break;
+        } else if (freeParameters.every(defaults.containsKey)) {
+          defaults[parameter] = value.substitute2(
+              defaults.values.toList(), defaults.keys.toList());
+          partials.remove(parameter);
+          hasProgress = true;
+          break;
+        }
+      }
+    }
+
+    // If we stopped making progress, and not all types are ground,
+    // then the whole type is malbounded and an error should be reported.
+    if (partials.isNotEmpty) {
+      if (hasError != null) {
+        hasError[0] = true;
+      }
+      return instantiateType(
+          type, new List<DartType>.filled(count, DynamicTypeImpl.instance));
+    }
+
+    List<DartType> orderedArguments =
+        typeFormals.map((p) => defaults[p.type]).toList();
+    return instantiateType(type, orderedArguments);
   }
 
   @override
@@ -615,6 +524,32 @@
   }
 
   @override
+  DartType tryPromoteToType(DartType to, DartType from) {
+    // Allow promoting to a subtype, for example:
+    //
+    //     f(Base b) {
+    //       if (b is SubTypeOfBase) {
+    //         // promote `b` to SubTypeOfBase for this block
+    //       }
+    //     }
+    //
+    // This allows the variable to be used wherever the supertype (here `Base`)
+    // is expected, while gaining a more precise type.
+    if (isSubtypeOf(to, from)) {
+      return to;
+    }
+    // For a type parameter `T extends U`, allow promoting the upper bound
+    // `U` to `S` where `S <: U`, yielding a type parameter `T extends S`.
+    if (from is TypeParameterType) {
+      if (isSubtypeOf(to, from.resolveToBound(DynamicTypeImpl.instance))) {
+        return new TypeParameterMember(from.element, null, to).type;
+      }
+    }
+
+    return null;
+  }
+
+  @override
   DartType typeToConcreteType(DartType t) {
     if (t is FunctionType) {
       return functionTypeToConcreteType(t);
@@ -764,8 +699,7 @@
   /// If [t1] or [t2] is a type parameter we are inferring, update its bound.
   /// Returns `true` if we could possibly find a compatible type,
   /// otherwise `false`.
-  bool _inferTypeParameterSubtypeOf(
-      DartType t1, DartType t2, Set<Element> visited) {
+  bool _inferTypeParameterSubtypeOf(DartType t1, DartType t2) {
     return false;
   }
 
@@ -891,12 +825,11 @@
 
     // Guard recursive calls
     _GuardedSubtypeChecker<DartType> guardedSubtype = _guard(_isSubtypeOf);
-    _GuardedSubtypeChecker<DartType> guardedInferTypeParameter =
-        _guard(_inferTypeParameterSubtypeOf);
 
     // The types are void, dynamic, bottom, interface types, function types,
-    // and type parameters. We proceed by eliminating these different classes
-    // from consideration.
+    // FutureOr<T> and type parameters.
+    //
+    // We proceed by eliminating these different classes from consideration.
 
     // Trivially true.
     if (_isTop(t2, dynamicIsBottom: dynamicIsBottom) ||
@@ -907,7 +840,7 @@
     // Trivially false.
     if (_isTop(t1, dynamicIsBottom: dynamicIsBottom) ||
         _isBottom(t2, dynamicIsBottom: dynamicIsBottom)) {
-      return guardedInferTypeParameter(t1, t2, visited);
+      return _inferTypeParameterSubtypeOf(t1, t2);
     }
 
     // S <: T where S is a type variable
@@ -920,7 +853,7 @@
           guardedSubtype(t1.bound, t2.bound, visited)) {
         return true;
       }
-      if (guardedInferTypeParameter(t1, t2, visited)) {
+      if (_inferTypeParameterSubtypeOf(t1, t2)) {
         return true;
       }
       DartType bound = t1.element.bound;
@@ -928,20 +861,30 @@
     }
 
     if (t2 is TypeParameterType) {
-      return guardedInferTypeParameter(t1, t2, visited);
+      return _inferTypeParameterSubtypeOf(t1, t2);
     }
 
-    if (t1 is FutureUnionType) {
+    // 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 isSubtypeOf(t1TypeArg, t2TypeArg);
+      }
+
       // given t1 is Future<A> | A, then:
-      // (Future<A> | A) <: t2 iff t2 <: Future<A> and t2 <: A.
-      return guardedSubtype(t1.futureOfType, t2, visited) &&
-          guardedSubtype(t1.type, t2, visited);
+      // (Future<A> | A) <: t2 iff Future<A> <: t2 and A <: t2.
+      var t1Future = typeProvider.futureType.instantiate([t1TypeArg]);
+      return isSubtypeOf(t1Future, t2) && isSubtypeOf(t1TypeArg, t2);
     }
-    if (t2 is FutureUnionType) {
+
+    if (t2 is InterfaceType && t2.isDartAsyncFutureOr) {
       // given t2 is Future<A> | A, then:
       // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
-      return guardedSubtype(t1, t2.futureOfType, visited) ||
-          guardedSubtype(t1, t2.type, visited);
+      var t2TypeArg = t2.typeArguments[0];
+      var t2Future = typeProvider.futureType.instantiate([t2TypeArg]);
+      return isSubtypeOf(t1, t2Future) || isSubtypeOf(t1, t2TypeArg);
     }
 
     // Void only appears as the return type of a function, and we handle it
@@ -954,8 +897,8 @@
       return t1.isVoid && t2.isVoid;
     }
 
-    // We've eliminated void, dynamic, bottom, and type parameters.  The only
-    // cases are the combinations of interface type and function type.
+    // We've eliminated void, dynamic, bottom, type parameters, and FutureOr.
+    // The only cases are the combinations of interface type and function type.
 
     // A function type can only subtype an interface type if
     // the interface type is Function
@@ -1045,25 +988,16 @@
  */
 abstract class TypeSystem {
   /**
+   * Whether the type system is strong or not.
+   */
+  bool get isStrong;
+
+  /**
    * The provider of types for the system
    */
   TypeProvider get typeProvider;
 
   /**
-   * Tries to promote from the first type from the second type, and returns the
-   * promoted type if it succeeds, otherwise null.
-   *
-   * In the Dart 1 type system, it is not possible to promote from or to
-   * `dynamic`, and we must be promoting to a more specific type, see
-   * [isMoreSpecificThan]. Also it will always return the promote [to] type or
-   * null.
-   *
-   * In strong mode, this can potentially return a different type, see
-   * the override in [StrongTypeSystemImpl].
-   */
-  DartType tryPromoteToType(DartType to, DartType from);
-
-  /**
    * Make a function type concrete.
    *
    * Normally we treat dynamically typed parameters as bottom for function
@@ -1143,7 +1077,7 @@
    * classic Dart `dynamic` will be used for all type arguments, whereas
    * strong mode prefers the actual bound type if it was specified.
    */
-  DartType instantiateToBounds(DartType type);
+  DartType instantiateToBounds(DartType type, {List<bool> hasError});
 
   /**
    * Given a [DartType] [type] and a list of types
@@ -1270,6 +1204,20 @@
   }
 
   /**
+   * Tries to promote from the first type from the second type, and returns the
+   * promoted type if it succeeds, otherwise null.
+   *
+   * In the Dart 1 type system, it is not possible to promote from or to
+   * `dynamic`, and we must be promoting to a more specific type, see
+   * [isMoreSpecificThan]. Also it will always return the promote [to] type or
+   * null.
+   *
+   * In strong mode, this can potentially return a different type, see
+   * the override in [StrongTypeSystemImpl].
+   */
+  DartType tryPromoteToType(DartType to, DartType from);
+
+  /**
    * Given a [DartType] type, return the [TypeParameterElement]s corresponding
    * to its formal type parameters (if any).
    *
@@ -1418,25 +1366,15 @@
   TypeSystemImpl(this.typeProvider);
 
   @override
-  DartType tryPromoteToType(DartType to, DartType from) {
-    // Declared type should not be "dynamic".
-    // Promoted type should not be "dynamic".
-    // Promoted type should be more specific than declared.
-    if (!from.isDynamic && !to.isDynamic && to.isMoreSpecificThan(from)) {
-      return to;
-    } else {
-      return null;
-    }
-  }
+  bool get isStrong => false;
 
-  @override
   FunctionType functionTypeToConcreteType(FunctionType t) => t;
 
   /**
    * Instantiate a parameterized type using `dynamic` for all generic
    * parameters.  Returns the type unchanged if there are no parameters.
    */
-  DartType instantiateToBounds(DartType type) {
+  DartType instantiateToBounds(DartType type, {List<bool> hasError}) {
     List<DartType> typeFormals = typeFormalsAsTypes(type);
     int count = typeFormals.length;
     if (count > 0) {
@@ -1462,6 +1400,18 @@
   }
 
   @override
+  DartType tryPromoteToType(DartType to, DartType from) {
+    // Declared type should not be "dynamic".
+    // Promoted type should not be "dynamic".
+    // Promoted type should be more specific than declared.
+    if (!from.isDynamic && !to.isDynamic && to.isMoreSpecificThan(from)) {
+      return to;
+    } else {
+      return null;
+    }
+  }
+
+  @override
   DartType typeToConcreteType(DartType t) => t;
 
   @override
@@ -1554,7 +1504,7 @@
       if (declaredUpperBound != null) {
         // Assert that the type parameter is a subtype of its bound.
         _inferTypeParameterSubtypeOf(typeParam,
-            declaredUpperBound.substitute2(inferredTypes, fnTypeParams), null);
+            declaredUpperBound.substitute2(inferredTypes, fnTypeParams));
       }
 
       // Now we've computed lower and upper bounds for each type parameter.
@@ -1573,38 +1523,6 @@
       DartType lowerBound = bound.lower;
       DartType upperBound = bound.upper;
 
-      // Collapse future unions if we inferred them somehow.
-      //
-      // TODO(jmesserly): in our initial upward phase it would be fine to
-      // keep the FutureUnionType for the argument downward context.
-      //
-      // We need to track in `inferGenericFunctionCall` whether we are going up
-      // or down. This would also allow for an improved heuristic: if we are
-      // doing our final inference, the downward context can take priority.
-      if (lowerBound is FutureUnionType) {
-        // lowerBound <: T, where lowerBound is Future<A> | A.
-        // So we choose lowerBound as LUB(A, Future<A>).
-        //
-        // This will typically lead to top with the current rules, but it will
-        // work with `bottom` or if we remove Future flattening.
-        var f = lowerBound as FutureUnionType;
-        lowerBound = _typeSystem.getLeastUpperBound(f.futureOfType, f.type);
-      }
-      if (upperBound is FutureUnionType) {
-        // T <: upperBound, where upperBound is Future<A> | A.
-        // Therefore we need T <: Future<A> or T <: A.
-        //
-        // This is just an arbitrarily heuristic.
-        var f = upperBound as FutureUnionType;
-        if (_typeSystem.isSubtypeOf(lowerBound, f.type)) {
-          upperBound = f.type;
-        } else if (_typeSystem.isSubtypeOf(lowerBound, f.futureOfType)) {
-          upperBound = f.futureOfType;
-        } else {
-          upperBound = f.type;
-        }
-      }
-
       // See if the bounds can be satisfied.
       // TODO(jmesserly): also we should have an error for unconstrained type
       // parameters, rather than silently inferring dynamic.
@@ -1644,8 +1562,7 @@
   }
 
   @override
-  bool _inferTypeParameterSubtypeOf(
-      DartType t1, DartType t2, Set<Element> visited) {
+  bool _inferTypeParameterSubtypeOf(DartType t1, DartType t2) {
     if (t1 is TypeParameterType) {
       _TypeParameterBound bound = _bounds[t1];
       if (bound != null) {
diff --git a/pkg/analyzer/lib/src/summary/bazel_summary.dart b/pkg/analyzer/lib/src/summary/bazel_summary.dart
deleted file mode 100644
index a7b9b88..0000000
--- a/pkg/analyzer/lib/src/summary/bazel_summary.dart
+++ /dev/null
@@ -1,561 +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:convert';
-
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_collection.dart';
-import 'package:analyzer/src/summary/api_signature.dart';
-import 'package:analyzer/src/summary/format.dart';
-import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/summary/link.dart';
-import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/summary/summarize_elements.dart';
-import 'package:analyzer/src/util/fast_uri.dart';
-import 'package:convert/convert.dart';
-import 'package:crypto/crypto.dart';
-import 'package:meta/meta.dart';
-
-/**
- * Return the [Folder] where bundles for the given [absoluteUri] should be
- * looked for. This folder should contain corresponding `*.full.ds` files,
- * possibly more than one one.  Return `null` if the given [absoluteUri]
- * does not have the expected structure, so the output path cannot be computed.
- */
-typedef Folder GetOutputFolder(Uri absoluteUri);
-
-/**
- * Load linked packages on demand from [SummaryProvider].
- */
-class BazelResultProvider extends ResynthesizerResultProvider {
-  final SummaryDataStore dataStore;
-  final SummaryProvider summaryProvider;
-
-  final Map<Source, bool> sourceToSuccessMap = <Source, bool>{};
-  final Set<Package> addedPackages = new Set<Package>();
-
-  factory BazelResultProvider(SummaryProvider summaryProvider) {
-    SummaryDataStore dataStore = new SummaryDataStore(const <String>[]);
-    return new BazelResultProvider._(dataStore, summaryProvider);
-  }
-
-  BazelResultProvider._(
-      SummaryDataStore dataStore, SummaryProvider summaryProvider)
-      : dataStore = dataStore,
-        summaryProvider = summaryProvider,
-        super(summaryProvider.context, dataStore) {
-    AnalysisContext sdkContext = context.sourceFactory.dartSdk.context;
-    createResynthesizer(sdkContext, sdkContext.typeProvider);
-  }
-
-  @override
-  bool hasResultsForSource(Source source) {
-    return sourceToSuccessMap.putIfAbsent(source, () {
-      List<Package> packages = summaryProvider.getLinkedPackages(source);
-      if (packages == null) {
-        return false;
-      }
-      for (Package package in packages) {
-        if (addedPackages.add(package)) {
-          dataStore.addBundle(null, package.unlinked);
-          dataStore.addBundle(null, package.linked);
-        }
-      }
-      String uriString = source.uri.toString();
-      return resynthesizer.hasLibrarySummary(uriString);
-    });
-  }
-}
-
-/**
- * Information about a Dart package in Bazel.
- */
-class Package {
-  final File unlinkedFile;
-  final PackageBundle unlinked;
-  final Set<String> _unitUris = new Set<String>();
-
-  PackageBundle _linked;
-
-  Package(this.unlinkedFile, this.unlinked) {
-    _unitUris.addAll(unlinked.unlinkedUnitUris);
-  }
-
-  PackageBundle get linked => _linked;
-
-  @override
-  String toString() => '$unlinkedFile';
-}
-
-/**
- * Class that reads summaries of Bazel packages.
- *
- * When the client needs to produce a resolution result for a new [Source], it
- * should call [getLinkedPackages] to check whether there is the set of
- * packages to resynthesize resolution results.
- */
-class SummaryProvider {
-  final ResourceProvider provider;
-  final String tempFileName;
-  final GetOutputFolder getOutputFolder;
-  final Folder linkedCacheFolder;
-  final AnalysisContext context;
-  final PackageBundle sdkBundle;
-
-  /**
-   * If `true` (by default), then linking new bundles is allowed.
-   * Otherwise only using existing cached bundles can be used.
-   */
-  final bool allowLinking;
-
-  /**
-   * See [PackageBundleAssembler.currentMajorVersion].
-   */
-  final int majorVersion;
-
-  /**
-   * Mapping from bundle paths to corresponding [Package]s.  The packages in
-   * the map were consistent with their constituent sources at the moment when
-   * they were put into the map.
-   */
-  final Map<Folder, List<Package>> folderToPackagesMap = {};
-
-  /**
-   * Mapping from [Uri]s to corresponding [Package]s.
-   */
-  final Map<Uri, Package> uriToPackageMap = {};
-
-  /**
-   * Mapping from [Package]s to corresponding [_LinkNode]s.
-   */
-  final Map<Package, _LinkNode> packageToNodeMap = {};
-
-  SummaryProvider(
-      this.provider,
-      this.tempFileName,
-      this.getOutputFolder,
-      this.linkedCacheFolder,
-      AnalysisContext context,
-      {@visibleForTesting
-          this.allowLinking: true,
-      @visibleForTesting
-          this.majorVersion: PackageBundleAssembler.currentMajorVersion})
-      : context = context,
-        sdkBundle = context.sourceFactory.dartSdk?.getLinkedBundle();
-
-  /**
-   * Return the complete list of [Package]s that are required to provide all
-   * resolution results for the given [source].
-   *
-   * The same list of packages is returned for the same [Source], i.e. always
-   * the full list, not a difference with a previous request.  It is up to the
-   * client to decide whether some of the returned packages should be excluded
-   * as already mixed into a resynthesizer.
-   *
-   * If the full set of packages cannot be produced, for example because some
-   * bundles are not built, or out of date, etc, then `null` is returned.
-   */
-  List<Package> getLinkedPackages(Source source) {
-    // Find the node that contains the source.
-    _LinkNode node = _getLinkNodeForUri(source.uri);
-    if (node == null) {
-      return null;
-    }
-
-    // Compute all transitive dependencies.
-    node.computeTransitiveDependencies();
-    List<_LinkNode> nodes = node.transitiveDependencies.toList();
-    nodes.forEach((dependency) => dependency.computeTransitiveDependencies());
-
-    // Fail if any dependency cannot be resolved.
-    if (node.failed) {
-      return null;
-    }
-
-    // Read existing cached linked bundles.
-    for (_LinkNode node in nodes) {
-      _readLinked(node);
-    }
-
-    // Link new packages, if allowed.
-    if (allowLinking) {
-      _link(nodes);
-    }
-
-    // Create successfully linked packages.
-    return nodes
-        .map((node) => node.package)
-        .where((package) => package.linked != null)
-        .toList();
-  }
-
-  /**
-   * Return the [Package] that contains information about the source with
-   * the given [uri], or `null` if such package does not exist.
-   */
-  @visibleForTesting
-  Package getUnlinkedForUri(Uri uri) {
-    return uriToPackageMap.putIfAbsent(uri, () {
-      Folder outputFolder = getOutputFolder(uri);
-      if (outputFolder != null) {
-        String uriStr = uri.toString();
-        List<Package> packages = _getUnlinkedPackages(outputFolder);
-        for (Package package in packages) {
-          if (package._unitUris.contains(uriStr)) {
-            return package;
-          }
-        }
-      }
-      return null;
-    });
-  }
-
-  /**
-   * Return the hexadecimal string of the MD5 hash of the contents of the
-   * given [source] in [context].
-   */
-  String _computeSourceHashHex(Source source) {
-    String text = context.getContents(source).data;
-    List<int> bytes = UTF8.encode(text);
-    List<int> hashBytes = md5.convert(bytes).bytes;
-    return hex.encode(hashBytes);
-  }
-
-  /**
-   * Return the name of the file for a linked bundle, in strong or spec mode.
-   */
-  String _getLinkedName(String hash) {
-    if (context.analysisOptions.strongMode) {
-      return 'linked_$hash.ds';
-    } else {
-      return 'linked_spec_$hash.ds';
-    }
-  }
-
-  /**
-   * Return the node for the given [uri], or `null` if there is no unlinked
-   * bundle that contains [uri].
-   */
-  _LinkNode _getLinkNodeForUri(Uri uri) {
-    Package package = getUnlinkedForUri(uri);
-    return packageToNodeMap.putIfAbsent(package, () {
-      if (package == null) {
-        return null;
-      }
-      return new _LinkNode(this, package);
-    });
-  }
-
-  /**
-   * Return all consistent unlinked [Package]s in the given [folder].  Some of
-   * the returned packages might be already linked.
-   */
-  List<Package> _getUnlinkedPackages(Folder folder) {
-    List<Package> packages = folderToPackagesMap[folder];
-    if (packages == null) {
-      packages = <Package>[];
-      try {
-        List<Resource> children = folder.getChildren();
-        for (Resource child in children) {
-          if (child is File) {
-            String packagePath = child.path;
-            if (packagePath.toLowerCase().endsWith('.full.ds')) {
-              Package package = _readUnlinkedPackage(child);
-              if (package != null) {
-                packages.add(package);
-              }
-            }
-          }
-        }
-      } on FileSystemException {}
-      folderToPackagesMap[folder] = packages;
-    }
-    return packages;
-  }
-
-  /**
-   * Return `true` if the unlinked information of the [bundle] is consistent
-   * with its constituent sources in [context].
-   */
-  bool _isUnlinkedBundleConsistent(PackageBundle bundle) {
-    try {
-      // Compute hashes of the constituent sources.
-      List<String> actualHashes = <String>[];
-      for (String uri in bundle.unlinkedUnitUris) {
-        Source source = context.sourceFactory.resolveUri(null, uri);
-        if (source == null) {
-          return false;
-        }
-        String hash = _computeSourceHashHex(source);
-        actualHashes.add(hash);
-      }
-      // Compare sorted actual and bundle unit hashes.
-      List<String> bundleHashes = bundle.unlinkedUnitHashes.toList()..sort();
-      actualHashes.sort();
-      return listsEqual(actualHashes, bundleHashes);
-    } on FileSystemException {}
-    return false;
-  }
-
-  /**
-   * Link the given [nodes].
-   */
-  void _link(List<_LinkNode> nodes) {
-    // Fill the store with bundles.
-    // Append the linked SDK bundle.
-    // Append unlinked and (if read from a cache) linked package bundles.
-    SummaryDataStore store = new SummaryDataStore(const <String>[]);
-    store.addBundle(null, sdkBundle);
-    for (_LinkNode node in nodes) {
-      store.addBundle(null, node.package.unlinked);
-      if (node.package.linked != null) {
-        store.addBundle(null, node.package.linked);
-      }
-    }
-
-    // Prepare URIs to link.
-    Map<String, _LinkNode> uriToNode = <String, _LinkNode>{};
-    for (_LinkNode node in nodes) {
-      if (!node.isReady) {
-        for (String uri in node.package.unlinked.unlinkedUnitUris) {
-          uriToNode[uri] = node;
-        }
-      }
-    }
-    Set<String> libraryUris = uriToNode.keys.toSet();
-
-    // Perform linking.
-    Map<String, LinkedLibraryBuilder> linkedLibraries =
-        link(libraryUris, (String uri) {
-      return store.linkedMap[uri];
-    }, (String uri) {
-      return store.unlinkedMap[uri];
-    }, context.declaredVariables.get, context.analysisOptions.strongMode);
-
-    // Assemble newly linked bundles.
-    for (_LinkNode node in nodes) {
-      if (!node.isReady) {
-        PackageBundleAssembler assembler = new PackageBundleAssembler();
-        linkedLibraries.forEach((uri, linkedLibrary) {
-          if (identical(uriToNode[uri], node)) {
-            assembler.addLinkedLibrary(uri, linkedLibrary);
-          }
-        });
-        List<int> bytes = assembler.assemble().toBuffer();
-        node.package._linked = new PackageBundle.fromBuffer(bytes);
-        _writeLinked(node, bytes);
-      }
-    }
-  }
-
-  /**
-   * Attempt to read the linked bundle that corresponds to the given [node]
-   * with all its transitive dependencies.
-   */
-  void _readLinked(_LinkNode node) {
-    String hash = node.linkedHash;
-    if (!node.isReady && hash != null) {
-      String fileName = _getLinkedName(hash);
-      File file = linkedCacheFolder.getChildAssumingFile(fileName);
-      // Try to read from the file system.
-      if (file.exists) {
-        try {
-          List<int> bytes = file.readAsBytesSync();
-          node.package._linked = new PackageBundle.fromBuffer(bytes);
-        } on FileSystemException {
-          // Ignore file system exceptions.
-        }
-      }
-    }
-  }
-
-  /**
-   * Read the unlinked [Package] from the given [file], or return `null` if the
-   * file does not exist, or it cannot be read, or is not consistent with the
-   * constituent sources on the file system.
-   */
-  Package _readUnlinkedPackage(File file) {
-    try {
-      List<int> bytes = file.readAsBytesSync();
-      PackageBundle bundle = new PackageBundle.fromBuffer(bytes);
-      // Check the major version.
-      if (bundle.majorVersion != majorVersion) {
-        return null;
-      }
-      // Check for consistency, and fail if it's not.
-      if (!_isUnlinkedBundleConsistent(bundle)) {
-        return null;
-      }
-      // OK, use the bundle.
-      return new Package(file, bundle);
-    } on FileSystemException {}
-    return null;
-  }
-
-  /**
-   * Atomically write the given [bytes] into the file in the [folder].
-   */
-  void _writeAtomic(Folder folder, String fileName, List<int> bytes) {
-    String filePath = folder.getChildAssumingFile(fileName).path;
-    File tempFile = folder.getChildAssumingFile(tempFileName);
-    tempFile.writeAsBytesSync(bytes);
-    tempFile.renameSync(filePath);
-  }
-
-  /**
-   * If a new linked bundle was linked for the given [node], write the bundle
-   * into the memory cache and the file system.
-   */
-  void _writeLinked(_LinkNode node, List<int> bytes) {
-    String hash = node.linkedHash;
-    if (hash != null) {
-      String fileName = _getLinkedName(hash);
-      _writeAtomic(linkedCacheFolder, fileName, bytes);
-    }
-  }
-}
-
-/**
- * Information about a single [Package].
- */
-class _LinkNode {
-  final SummaryProvider linker;
-  final Package package;
-
-  bool failed = false;
-  Set<_LinkNode> transitiveDependencies;
-
-  List<_LinkNode> _dependencies;
-  String _linkedHash;
-
-  _LinkNode(this.linker, this.package);
-
-  /**
-   * Retrieve the dependencies of this node.
-   */
-  List<_LinkNode> get dependencies {
-    if (_dependencies == null) {
-      Set<_LinkNode> dependencies = new Set<_LinkNode>();
-
-      void appendDependency(String uriStr) {
-        Uri uri = FastUri.parse(uriStr);
-        if (!uri.hasScheme) {
-          // A relative path in this package, skip it.
-        } else if (uri.scheme == 'dart') {
-          // Dependency on the SDK is implicit and always added.
-          // The SDK linked bundle is precomputed before linking packages.
-        } else if (uri.scheme == 'package') {
-          _LinkNode packageNode = linker._getLinkNodeForUri(uri);
-          if (packageNode == null) {
-            failed = true;
-          }
-          if (packageNode != null) {
-            dependencies.add(packageNode);
-          }
-        } else {
-          failed = true;
-        }
-      }
-
-      for (UnlinkedUnit unit in package.unlinked.unlinkedUnits) {
-        for (UnlinkedImport import in unit.imports) {
-          if (!import.isImplicit) {
-            appendDependency(import.uri);
-          }
-        }
-        for (UnlinkedExportPublic export in unit.publicNamespace.exports) {
-          appendDependency(export.uri);
-        }
-      }
-
-      _dependencies = dependencies.toList();
-    }
-    return _dependencies;
-  }
-
-  /**
-   * Return `true` is the node is ready - has the linked bundle or failed (does
-   * not have all required dependencies).
-   */
-  bool get isReady => package.linked != null || failed;
-
-  /**
-   * Return the hash string that corresponds to this linked bundle in the
-   * context of its SDK bundle and transitive dependencies.  Return `null` if
-   * the hash computation fails, because for example the full transitive
-   * dependencies cannot computed.
-   */
-  String get linkedHash {
-    if (_linkedHash == null && transitiveDependencies != null && !failed) {
-      ApiSignature signature = new ApiSignature();
-      // Add all unlinked API signatures.
-      List<String> signatures = <String>[];
-      signatures.add(linker.sdkBundle.apiSignature);
-      transitiveDependencies
-          .map((node) => node.package.unlinked.apiSignature)
-          .forEach(signatures.add);
-      signatures.sort();
-      signatures.forEach(signature.addString);
-      // Combine into a single hash.
-      appendDeclaredVariables(signature);
-      _linkedHash = signature.toHex();
-    }
-    return _linkedHash;
-  }
-
-  /**
-   * Append names and values of all referenced declared variables (even the
-   * ones without actually declared values) to the given [signature].
-   */
-  void appendDeclaredVariables(ApiSignature signature) {
-    Set<String> nameSet = new Set<String>();
-    for (_LinkNode node in transitiveDependencies) {
-      for (UnlinkedUnit unit in node.package.unlinked.unlinkedUnits) {
-        for (UnlinkedImport import in unit.imports) {
-          for (UnlinkedConfiguration configuration in import.configurations) {
-            nameSet.add(configuration.name);
-          }
-        }
-        for (UnlinkedExportPublic export in unit.publicNamespace.exports) {
-          for (UnlinkedConfiguration configuration in export.configurations) {
-            nameSet.add(configuration.name);
-          }
-        }
-      }
-    }
-    List<String> sortedNameList = nameSet.toList()..sort();
-    signature.addInt(sortedNameList.length);
-    for (String name in sortedNameList) {
-      signature.addString(name);
-      signature.addString(linker.context.declaredVariables.get(name) ?? '');
-    }
-  }
-
-  /**
-   * Compute the set of existing transitive dependencies for this node.
-   * If any dependency cannot be resolved, then set [failed] to `true`.
-   * Only unlinked bundle is used, so this method can be called before linking.
-   */
-  void computeTransitiveDependencies() {
-    if (transitiveDependencies == null) {
-      transitiveDependencies = new Set<_LinkNode>();
-
-      void appendDependencies(_LinkNode node) {
-        if (transitiveDependencies.add(node)) {
-          node.dependencies.forEach(appendDependencies);
-        }
-      }
-
-      appendDependencies(this);
-      if (transitiveDependencies.any((node) => node.failed)) {
-        failed = true;
-      }
-    }
-  }
-
-  @override
-  String toString() => package.toString();
-}
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index c38e50b..95f7186 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -7925,6 +7925,8 @@
   int _inferredTypeSlot;
   int _inheritsCovariantSlot;
   UnlinkedExecutableBuilder _initializer;
+  bool _isExplicitlyCovariant;
+  bool _isFinal;
   bool _isFunctionTyped;
   bool _isInitializingFormal;
   idl.UnlinkedParamKind _kind;
@@ -8013,6 +8015,26 @@
   }
 
   @override
+  bool get isExplicitlyCovariant => _isExplicitlyCovariant ??= false;
+
+  /**
+   * Indicates whether this parameter is explicitly marked as being covariant.
+   */
+  void set isExplicitlyCovariant(bool value) {
+    this._isExplicitlyCovariant = value;
+  }
+
+  @override
+  bool get isFinal => _isFinal ??= false;
+
+  /**
+   * Indicates whether the parameter is declared using the `final` keyword.
+   */
+  void set isFinal(bool value) {
+    this._isFinal = value;
+  }
+
+  @override
   bool get isFunctionTyped => _isFunctionTyped ??= false;
 
   /**
@@ -8108,13 +8130,15 @@
     this._visibleOffset = value;
   }
 
-  UnlinkedParamBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder codeRange, String defaultValueCode, int inferredTypeSlot, int inheritsCovariantSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
+  UnlinkedParamBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder codeRange, String defaultValueCode, int inferredTypeSlot, int inheritsCovariantSlot, UnlinkedExecutableBuilder initializer, bool isExplicitlyCovariant, bool isFinal, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
     : _annotations = annotations,
       _codeRange = codeRange,
       _defaultValueCode = defaultValueCode,
       _inferredTypeSlot = inferredTypeSlot,
       _inheritsCovariantSlot = inheritsCovariantSlot,
       _initializer = initializer,
+      _isExplicitlyCovariant = isExplicitlyCovariant,
+      _isFinal = isFinal,
       _isFunctionTyped = isFunctionTyped,
       _isInitializingFormal = isInitializingFormal,
       _kind = kind,
@@ -8170,6 +8194,8 @@
     signature.addBool(this._initializer != null);
     this._initializer?.collectApiSignature(signature);
     signature.addInt(this._inheritsCovariantSlot ?? 0);
+    signature.addBool(this._isExplicitlyCovariant == true);
+    signature.addBool(this._isFinal == true);
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
@@ -8220,6 +8246,12 @@
     if (offset_initializer != null) {
       fbBuilder.addOffset(12, offset_initializer);
     }
+    if (_isExplicitlyCovariant == true) {
+      fbBuilder.addBool(15, true);
+    }
+    if (_isFinal == true) {
+      fbBuilder.addBool(16, true);
+    }
     if (_isFunctionTyped == true) {
       fbBuilder.addBool(5, true);
     }
@@ -8270,6 +8302,8 @@
   int _inferredTypeSlot;
   int _inheritsCovariantSlot;
   idl.UnlinkedExecutable _initializer;
+  bool _isExplicitlyCovariant;
+  bool _isFinal;
   bool _isFunctionTyped;
   bool _isInitializingFormal;
   idl.UnlinkedParamKind _kind;
@@ -8317,6 +8351,18 @@
   }
 
   @override
+  bool get isExplicitlyCovariant {
+    _isExplicitlyCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 15, false);
+    return _isExplicitlyCovariant;
+  }
+
+  @override
+  bool get isFinal {
+    _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 16, false);
+    return _isFinal;
+  }
+
+  @override
   bool get isFunctionTyped {
     _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, false);
     return _isFunctionTyped;
@@ -8381,6 +8427,8 @@
     if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
     if (inheritsCovariantSlot != 0) _result["inheritsCovariantSlot"] = inheritsCovariantSlot;
     if (initializer != null) _result["initializer"] = initializer.toJson();
+    if (isExplicitlyCovariant != false) _result["isExplicitlyCovariant"] = isExplicitlyCovariant;
+    if (isFinal != false) _result["isFinal"] = isFinal;
     if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped;
     if (isInitializingFormal != false) _result["isInitializingFormal"] = isInitializingFormal;
     if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString().split('.')[1];
@@ -8401,6 +8449,8 @@
     "inferredTypeSlot": inferredTypeSlot,
     "inheritsCovariantSlot": inheritsCovariantSlot,
     "initializer": initializer,
+    "isExplicitlyCovariant": isExplicitlyCovariant,
+    "isFinal": isFinal,
     "isFunctionTyped": isFunctionTyped,
     "isInitializingFormal": isInitializingFormal,
     "kind": kind,
@@ -10254,6 +10304,7 @@
   int _inferredTypeSlot;
   UnlinkedExecutableBuilder _initializer;
   bool _isConst;
+  bool _isCovariant;
   bool _isFinal;
   bool _isStatic;
   String _name;
@@ -10330,6 +10381,17 @@
   }
 
   @override
+  bool get isCovariant => _isCovariant ??= false;
+
+  /**
+   * Indicates whether this variable is declared using the `covariant` keyword.
+   * This should be false for everything except instance fields.
+   */
+  void set isCovariant(bool value) {
+    this._isCovariant = value;
+  }
+
+  @override
   bool get isFinal => _isFinal ??= false;
 
   /**
@@ -10422,13 +10484,14 @@
     this._visibleOffset = value;
   }
 
-  UnlinkedVariableBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
+  UnlinkedVariableBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isCovariant, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
     : _annotations = annotations,
       _codeRange = codeRange,
       _documentationComment = documentationComment,
       _inferredTypeSlot = inferredTypeSlot,
       _initializer = initializer,
       _isConst = isConst,
+      _isCovariant = isCovariant,
       _isFinal = isFinal,
       _isStatic = isStatic,
       _name = name,
@@ -10474,6 +10537,7 @@
     signature.addInt(this._inferredTypeSlot ?? 0);
     signature.addBool(this._initializer != null);
     this._initializer?.collectApiSignature(signature);
+    signature.addBool(this._isCovariant == true);
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
@@ -10520,6 +10584,9 @@
     if (_isConst == true) {
       fbBuilder.addBool(6, true);
     }
+    if (_isCovariant == true) {
+      fbBuilder.addBool(14, true);
+    }
     if (_isFinal == true) {
       fbBuilder.addBool(7, true);
     }
@@ -10567,6 +10634,7 @@
   int _inferredTypeSlot;
   idl.UnlinkedExecutable _initializer;
   bool _isConst;
+  bool _isCovariant;
   bool _isFinal;
   bool _isStatic;
   String _name;
@@ -10613,6 +10681,12 @@
   }
 
   @override
+  bool get isCovariant {
+    _isCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 14, false);
+    return _isCovariant;
+  }
+
+  @override
   bool get isFinal {
     _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 7, false);
     return _isFinal;
@@ -10671,6 +10745,7 @@
     if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
     if (initializer != null) _result["initializer"] = initializer.toJson();
     if (isConst != false) _result["isConst"] = isConst;
+    if (isCovariant != false) _result["isCovariant"] = isCovariant;
     if (isFinal != false) _result["isFinal"] = isFinal;
     if (isStatic != false) _result["isStatic"] = isStatic;
     if (name != '') _result["name"] = name;
@@ -10690,6 +10765,7 @@
     "inferredTypeSlot": inferredTypeSlot,
     "initializer": initializer,
     "isConst": isConst,
+    "isCovariant": isCovariant,
     "isFinal": isFinal,
     "isStatic": isStatic,
     "name": name,
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index b04f94b..6a75528 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -2272,6 +2272,16 @@
   initializer:UnlinkedExecutable (id: 12);
 
   /**
+   * Indicates whether this parameter is explicitly marked as being covariant.
+   */
+  isExplicitlyCovariant:bool (id: 15);
+
+  /**
+   * Indicates whether the parameter is declared using the `final` keyword.
+   */
+  isFinal:bool (id: 16);
+
+  /**
    * Indicates whether this is a function-typed parameter.
    */
   isFunctionTyped:bool (id: 5);
@@ -2664,6 +2674,12 @@
   isConst:bool (id: 6);
 
   /**
+   * Indicates whether this variable is declared using the `covariant` keyword.
+   * This should be false for everything except instance fields.
+   */
+  isCovariant:bool (id: 14);
+
+  /**
    * Indicates whether the variable is declared using the `final` keyword.
    */
   isFinal:bool (id: 7);
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index c3894ca..0d8ce5e 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -2562,6 +2562,18 @@
   UnlinkedExecutable get initializer;
 
   /**
+   * Indicates whether this parameter is explicitly marked as being covariant.
+   */
+  @Id(15)
+  bool get isExplicitlyCovariant;
+
+  /**
+   * Indicates whether the parameter is declared using the `final` keyword.
+   */
+  @Id(16)
+  bool get isFinal;
+
+  /**
    * Indicates whether this is a function-typed parameter.
    */
   @Id(5)
@@ -3060,6 +3072,13 @@
   bool get isConst;
 
   /**
+   * Indicates whether this variable is declared using the `covariant` keyword.
+   * This should be false for everything except instance fields.
+   */
+  @Id(14)
+  bool get isCovariant;
+
+  /**
    * Indicates whether the variable is declared using the `final` keyword.
    */
   @Id(7)
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index a685504..67c5149 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -247,7 +247,7 @@
 }
 
 DartType _dynamicIfNull(DartType type) {
-  if (type == null || type.isBottom || type.isDartCoreNull || type.isVoid) {
+  if (type == null || type.isBottom || type.isDartCoreNull) {
     return DynamicTypeImpl.instance;
   }
   return type;
@@ -2274,6 +2274,9 @@
 
   void _doExtractProperty() {
     DartType target = stack.removeLast();
+    if (target.isDynamic) {
+      target = typeProvider.objectType;
+    }
     String propertyName = _getNextString();
     stack.add(() {
       if (target is InterfaceType) {
@@ -2336,6 +2339,9 @@
     String methodName = _getNextString();
     List<DartType> typeArguments = _getTypeArguments();
     DartType target = stack.removeLast();
+    if (target.isDynamic) {
+      target = typeProvider.objectType;
+    }
     stack.add(() {
       if (target is InterfaceType) {
         MethodElement method =
@@ -2856,6 +2862,9 @@
   String get identifier => '';
 
   @override
+  bool get isAsynchronous => _unlinkedExecutable.isAsynchronous;
+
+  @override
   DartType get returnType {
     // If this is a variable whose type needs inferring, infer it.
     if (_variable.hasImplicitType) {
@@ -2991,6 +3000,9 @@
   }
 
   @override
+  bool get isAsynchronous => _unlinkedExecutable.isAsynchronous;
+
+  @override
   bool get _hasTypeBeenInferred => _inferredReturnType != null;
 
   @override
@@ -3763,6 +3775,9 @@
   DartType get asStaticType {
     if (_library._linker.strongMode) {
       DartType targetType = _target.asStaticType;
+      if (targetType.isDynamic) {
+        targetType = _library._linker.typeProvider.objectType;
+      }
       if (targetType is InterfaceType) {
         ExecutableElement element =
             targetType.lookUpInheritedGetterOrMethod(_name, library: _library);
@@ -3859,7 +3874,7 @@
 
   @override
   bool get isCovariant {
-    if (inheritsCovariant) {
+    if (isExplicitlyCovariant || inheritsCovariant) {
       return true;
     }
     for (UnlinkedExpr annotation in _unlinkedParam.annotations) {
@@ -3878,6 +3893,9 @@
   }
 
   @override
+  bool get isExplicitlyCovariant => _unlinkedParam.isExplicitlyCovariant;
+
+  @override
   String get name => _unlinkedParam.name;
 
   @override
@@ -3955,7 +3973,10 @@
   ParameterElementForLink_VariableSetter(this.enclosingElement);
 
   @override
-  bool get isCovariant => false;
+  bool get isCovariant => isExplicitlyCovariant || inheritsCovariant;
+
+  @override
+  bool get isExplicitlyCovariant => enclosingElement.variable.isCovariant;
 
   @override
   bool get isSynthetic => true;
@@ -4634,8 +4655,15 @@
     if (inCycle) {
       functionElement._setInferredType(DynamicTypeImpl.instance);
     } else {
-      functionElement
-          ._setInferredType(new ExprTypeComputer(functionElement).compute());
+      var bodyType = new ExprTypeComputer(functionElement).compute();
+      if (functionElement.isAsynchronous) {
+        var linker = functionElement.compilationUnit.library._linker;
+        var typeProvider = linker.typeProvider;
+        var typeSystem = linker.typeSystem;
+        bodyType = typeProvider.futureType
+            .instantiate([bodyType.flattenFutures(typeSystem)]);
+      }
+      functionElement._setInferredType(bodyType);
     }
   }
 
@@ -4909,6 +4937,12 @@
   @override
   bool get isConst => unlinkedVariable.isConst;
 
+  /**
+   * Return `true` if this variable is a field that was explicitly marked as
+   * being covariant (in the setter's parameter).
+   */
+  bool get isCovariant => unlinkedVariable.isCovariant;
+
   @override
   bool get isFinal => unlinkedVariable.isFinal;
 
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index bdccb1e..ff5ab7f 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
@@ -27,8 +27,8 @@
   InputPackagesResultProvider(
       InternalAnalysisContext context, SummaryDataStore dataStore)
       : super(context, dataStore) {
-    AnalysisContext sdkContext = context.sourceFactory.dartSdk.context;
-    createResynthesizer(sdkContext, sdkContext.typeProvider);
+    createResynthesizer();
+    context.typeProvider = resynthesizer.typeProvider;
   }
 
   @override
@@ -121,7 +121,6 @@
   final SummaryDataStore _dataStore;
 
   _FileBasedSummaryResynthesizer _resynthesizer;
-  ResynthesizerResultProvider _sdkProvider;
 
   ResynthesizerResultProvider(this.context, this._dataStore);
 
@@ -136,10 +135,13 @@
 
   @override
   bool compute(CacheEntry entry, ResultDescriptor result) {
-    if (_sdkProvider != null && _sdkProvider.compute(entry, result)) {
+    AnalysisTarget target = entry.target;
+
+    if (result == TYPE_PROVIDER) {
+      entry.setValue(result as ResultDescriptor<TypeProvider>,
+          _resynthesizer.typeProvider, TargetedResult.EMPTY_LIST);
       return true;
     }
-    AnalysisTarget target = entry.target;
 
     // LINE_INFO can be provided using just the UnlinkedUnit.
     if (target is Source && result == LINE_INFO) {
@@ -264,19 +266,9 @@
    *
    * Subclasses must call this method in their constructors.
    */
-  void createResynthesizer(
-      InternalAnalysisContext sdkContext, TypeProvider typeProvider) {
-    // Set the type provider to prevent the context from computing it.
-    context.typeProvider = typeProvider;
-    // Create a chained resynthesizer.
-    _sdkProvider = sdkContext?.resultProvider;
-    _resynthesizer = new _FileBasedSummaryResynthesizer(
-        _sdkProvider?.resynthesizer,
-        context,
-        typeProvider,
-        context.sourceFactory,
-        context.analysisOptions.strongMode,
-        _dataStore);
+  void createResynthesizer() {
+    _resynthesizer = new _FileBasedSummaryResynthesizer(context,
+        context.sourceFactory, context.analysisOptions.strongMode, _dataStore);
   }
 
   /**
@@ -428,14 +420,9 @@
 class _FileBasedSummaryResynthesizer extends SummaryResynthesizer {
   final SummaryDataStore _dataStore;
 
-  _FileBasedSummaryResynthesizer(
-      SummaryResynthesizer parent,
-      AnalysisContext context,
-      TypeProvider typeProvider,
-      SourceFactory sourceFactory,
-      bool strongMode,
-      this._dataStore)
-      : super(parent, context, typeProvider, sourceFactory, strongMode);
+  _FileBasedSummaryResynthesizer(AnalysisContext context,
+      SourceFactory sourceFactory, bool strongMode, this._dataStore)
+      : super(context, sourceFactory, strongMode);
 
   @override
   LinkedLibrary getLinkedSummary(String uri) {
diff --git a/pkg/analyzer/lib/src/summary/prelink.dart b/pkg/analyzer/lib/src/summary/prelink.dart
index 062676e..489bd35 100644
--- a/pkg/analyzer/lib/src/summary/prelink.dart
+++ b/pkg/analyzer/lib/src/summary/prelink.dart
@@ -351,6 +351,11 @@
   void filterExportNamespace(String relativeUri,
       List<UnlinkedCombinator> combinators, Map<String, _Meaning> result) {
     Map<String, _Meaning> exportNamespace = computeExportNamespace(relativeUri);
+    if (result == null) {
+      // This can happen if the import prefix was shadowed by a local name, so
+      // the imported symbols are inaccessible.
+      return;
+    }
     NameFilter filter = new NameFilter.forUnlinkedCombinators(combinators);
     exportNamespace.forEach((String name, _Meaning meaning) {
       if (filter.accepts(name) && !result.containsKey(name)) {
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index aca2852..8fe29d9 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -22,6 +22,7 @@
 import 'package:analyzer/src/generated/testing/token_factory.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/summary_sdk.dart';
 
 /**
  * Implementation of [ElementResynthesizer] used when resynthesizing an element
@@ -29,13 +30,6 @@
  */
 abstract class SummaryResynthesizer extends ElementResynthesizer {
   /**
-   * The parent [SummaryResynthesizer] which is asked to resynthesize elements
-   * and get summaries before this resynthesizer attempts to do this.
-   * Can be `null`.
-   */
-  final SummaryResynthesizer parent;
-
-  /**
    * Source factory used to convert URIs to [Source] objects.
    */
   final SourceFactory sourceFactory;
@@ -46,10 +40,9 @@
   final Map<String, Source> _sources = <String, Source>{};
 
   /**
-   * The [TypeProvider] used to obtain core types (such as Object, int, List,
-   * and dynamic) during resynthesis.
+   * The [TypeProvider] used to obtain SDK types during resynthesis.
    */
-  final TypeProvider typeProvider;
+  TypeProvider _typeProvider;
 
   /**
    * Indicates whether the summary should be resynthesized assuming strong mode
@@ -80,9 +73,11 @@
   final Map<String, LibraryElement> _resynthesizedLibraries =
       <String, LibraryElement>{};
 
-  SummaryResynthesizer(this.parent, AnalysisContext context, this.typeProvider,
-      this.sourceFactory, this.strongMode)
-      : super(context);
+  SummaryResynthesizer(
+      AnalysisContext context, this.sourceFactory, this.strongMode)
+      : super(context) {
+    _buildTypeProvider();
+  }
 
   /**
    * Number of libraries that have been resynthesized so far.
@@ -90,23 +85,14 @@
   int get resynthesisCount => _resynthesizedLibraries.length;
 
   /**
-   * Perform delayed finalization of the `dart:core` and `dart:async` libraries.
+   * The [TypeProvider] used to obtain SDK types during resynthesis.
    */
-  void finalizeCoreAsyncLibraries() {
-    (_resynthesizedLibraries['dart:core'] as LibraryElementImpl)
-        .createLoadLibraryFunction(typeProvider);
-    (_resynthesizedLibraries['dart:async'] as LibraryElementImpl)
-        .createLoadLibraryFunction(typeProvider);
-  }
+  TypeProvider get typeProvider => _typeProvider;
 
   @override
   Element getElement(ElementLocation location) {
     List<String> components = location.components;
     String libraryUri = components[0];
-    // Ask the parent resynthesizer.
-    if (parent != null && parent._hasLibrarySummary(libraryUri)) {
-      return parent.getElement(location);
-    }
     // Resynthesize locally.
     if (components.length == 1) {
       return getLibraryElement(libraryUri);
@@ -203,11 +189,8 @@
    * hasn't been resynthesized already.
    */
   LibraryElement getLibraryElement(String uri) {
-    if (parent != null && parent._hasLibrarySummary(uri)) {
-      return parent.getLibraryElement(uri);
-    }
     return _resynthesizedLibraries.putIfAbsent(uri, () {
-      LinkedLibrary serializedLibrary = _getLinkedSummaryOrNull(uri);
+      LinkedLibrary serializedLibrary = getLinkedSummary(uri);
       Source librarySource = _getSource(uri);
       if (serializedLibrary == null) {
         LibraryElementImpl libraryElement =
@@ -223,7 +206,7 @@
         libraryElement.exportNamespace = new Namespace({});
         return libraryElement;
       }
-      UnlinkedUnit unlinkedSummary = _getUnlinkedSummaryOrNull(uri);
+      UnlinkedUnit unlinkedSummary = getUnlinkedSummary(uri);
       if (unlinkedSummary == null) {
         throw new StateError('Unable to find unlinked summary: $uri');
       }
@@ -234,7 +217,7 @@
           serializedUnits.add(null);
         } else {
           String partAbsUri = partSource.uri.toString();
-          serializedUnits.add(_getUnlinkedSummaryOrNull(partAbsUri) ??
+          serializedUnits.add(getUnlinkedSummary(partAbsUri) ??
               new UnlinkedUnitBuilder(codeRange: new CodeRangeBuilder()));
         }
       }
@@ -267,15 +250,15 @@
    */
   bool hasLibrarySummary(String uri);
 
-  /**
-   * Return the [LinkedLibrary] for the given [uri] or return `null` if it
-   * could not be found.
-   */
-  LinkedLibrary _getLinkedSummaryOrNull(String uri) {
-    if (parent != null && parent._hasLibrarySummary(uri)) {
-      return parent._getLinkedSummaryOrNull(uri);
-    }
-    return getLinkedSummary(uri);
+  void _buildTypeProvider() {
+    var coreLibrary = getLibraryElement('dart:core') as LibraryElementImpl;
+    var asyncLibrary = getLibraryElement('dart:async') as LibraryElementImpl;
+    SummaryTypeProvider summaryTypeProvider = new SummaryTypeProvider();
+    summaryTypeProvider.initializeCore(coreLibrary);
+    summaryTypeProvider.initializeAsync(asyncLibrary);
+    coreLibrary.createLoadLibraryFunction(summaryTypeProvider);
+    asyncLibrary.createLoadLibraryFunction(summaryTypeProvider);
+    _typeProvider = summaryTypeProvider;
   }
 
   /**
@@ -284,28 +267,6 @@
   Source _getSource(String uri) {
     return _sources.putIfAbsent(uri, () => sourceFactory.forUri(uri));
   }
-
-  /**
-   * Return the [UnlinkedUnit] for the given [uri] or return `null` if it
-   * could not be found.
-   */
-  UnlinkedUnit _getUnlinkedSummaryOrNull(String uri) {
-    if (parent != null && parent._hasLibrarySummary(uri)) {
-      return parent._getUnlinkedSummaryOrNull(uri);
-    }
-    return getUnlinkedSummary(uri);
-  }
-
-  /**
-   * Return `true` if this resynthesizer can provide summaries of the libraries
-   * with the given [uri].
-   */
-  bool _hasLibrarySummary(String uri) {
-    if (parent != null && parent._hasLibrarySummary(uri)) {
-      return true;
-    }
-    return hasLibrarySummary(uri);
-  }
 }
 
 /**
@@ -1297,7 +1258,7 @@
   /**
    * If this reference refers to a type, build a [DartType].  Otherwise return
    * `null`.  If [numTypeArguments] is the same as the [numTypeParameters],
-   * the type in instantiated with type arguments returned by [getTypeArgument],
+   * the type is instantiated with type arguments returned by [getTypeArgument],
    * otherwise it is instantiated with type parameter bounds (if strong mode),
    * or with `dynamic` type arguments.
    *
@@ -1324,22 +1285,14 @@
       InterfaceTypeImpl type =
           new InterfaceTypeImpl.elementWithNameAndArgs(element, name, () {
         if (typeArguments == null) {
-          typeArguments = element.typeParameters
-              .map/*<DartType>*/((_) => DynamicTypeImpl.instance)
-              .toList();
+          typeArguments = new List<DartType>.filled(
+              element.typeParameters.length, DynamicTypeImpl.instance);
           if (libraryResynthesizer.summaryResynthesizer.strongMode &&
               instantiateToBoundsAllowed) {
-            List<DartType> typeParameterTypes;
-            for (int i = 0; i < typeArguments.length; i++) {
-              DartType bound = element.typeParameters[i].bound;
-              if (bound != null) {
-                typeParameterTypes ??= element.typeParameters
-                    .map/*<DartType>*/((TypeParameterElement e) => e.type)
-                    .toList();
-                typeArguments[i] =
-                    bound.substitute2(typeArguments, typeParameterTypes);
-              }
-            }
+            InterfaceType instantiatedToBounds = libraryResynthesizer
+                .summaryResynthesizer.context.typeSystem
+                .instantiateToBounds(element.type) as InterfaceType;
+            return instantiatedToBounds.typeArguments;
           }
         }
         return typeArguments;
@@ -1407,6 +1360,9 @@
   _ResynthesizerContext(this._unitResynthesizer);
 
   @override
+  bool get isStrongMode => _unitResynthesizer.summaryResynthesizer.strongMode;
+
+  @override
   ElementAnnotationImpl buildAnnotation(ElementImpl context, UnlinkedExpr uc) {
     return _unitResynthesizer.buildAnnotation(context, uc);
   }
@@ -1568,6 +1524,15 @@
       elementAnnotation.annotationAst = AstTestFactory.annotation2(
           typeName, constructorName, constExpr.argumentList)
         ..element = constExpr.staticElement;
+    } else if (constExpr is PropertyAccess) {
+      var target = constExpr.target as Identifier;
+      var propertyName = constExpr.propertyName;
+      ArgumentList arguments =
+          constExpr.getProperty(_ConstExprBuilder.ARGUMENT_LIST);
+      elementAnnotation.element = propertyName.staticElement;
+      elementAnnotation.annotationAst = AstTestFactory.annotation2(
+          target, propertyName, arguments)
+        ..element = propertyName.staticElement;
     } else {
       throw new StateError(
           'Unexpected annotation type: ${constExpr.runtimeType}');
@@ -1775,6 +1740,13 @@
               libraryResynthesizer.getReferencedLocationComponents(
                   linkedReference.dependency, linkedReference.unit, identifier);
         }
+        if (!_resynthesizerContext.isStrongMode &&
+            locationComponents.length == 3 &&
+            locationComponents[0] == 'dart:async' &&
+            locationComponents[2] == 'FutureOr') {
+          type = typeProvider.dynamicType;
+          numTypeParameters = 0;
+        }
         ElementLocation location =
             new ElementLocationImpl.con3(locationComponents);
         if (enclosingInfo != null) {
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 7eb3ad5..35b5029 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -53,19 +53,19 @@
 
   @override
   void serializeAnnotation(Annotation annotation) {
-    if (annotation.arguments == null) {
-      assert(annotation.constructorName == null);
-      serialize(annotation.name);
+    Identifier name = annotation.name;
+    EntityRefBuilder constructor;
+    if (name is PrefixedIdentifier && annotation.constructorName == null) {
+      constructor =
+          serializeConstructorRef(null, name.prefix, null, name.identifier);
     } else {
-      Identifier name = annotation.name;
-      EntityRefBuilder constructor;
-      if (name is PrefixedIdentifier && annotation.constructorName == null) {
-        constructor =
-            serializeConstructorRef(null, name.prefix, null, name.identifier);
-      } else {
-        constructor = serializeConstructorRef(
-            null, annotation.name, null, annotation.constructorName);
-      }
+      constructor = serializeConstructorRef(
+          null, annotation.name, null, annotation.constructorName);
+    }
+    if (annotation.arguments == null) {
+      references.add(constructor);
+      operations.add(UnlinkedExprOperation.pushReference);
+    } else {
       serializeInstanceCreation(constructor, annotation.arguments);
     }
   }
@@ -807,6 +807,8 @@
     b.nameOffset = node.identifier.offset;
     b.annotations = serializeAnnotations(node.metadata);
     b.codeRange = serializeCodeRange(node);
+    b.isExplicitlyCovariant = node.covariantKeyword != null;
+    b.isFinal = node.isFinal;
     if (_parametersMayInheritCovariance) {
       b.inheritsCovariantSlot = assignSlot();
     }
@@ -971,10 +973,14 @@
       Comment documentationComment,
       NodeList<Annotation> annotations,
       bool isField) {
+    bool isCovariant = isField
+        ? (variables.parent as FieldDeclaration).covariantKeyword != null
+        : false;
     for (VariableDeclaration variable in variables.variables) {
       UnlinkedVariableBuilder b = new UnlinkedVariableBuilder();
-      b.isFinal = variables.isFinal;
       b.isConst = variables.isConst;
+      b.isCovariant = isCovariant;
+      b.isFinal = variables.isFinal;
       b.isStatic = isDeclaredStatic;
       b.name = variable.name.name;
       b.nameOffset = variable.name.offset;
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index ac6d4b3..b178fdc 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -7,7 +7,6 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/file_system/file_system.dart' show ResourceProvider;
-import 'package:analyzer/src/context/cache.dart' show CacheEntry;
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/constant.dart';
@@ -18,84 +17,6 @@
     show DartUriResolver, Source, SourceFactory;
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/summary/resynthesize.dart';
-import 'package:analyzer/src/task/dart.dart';
-import 'package:analyzer/task/model.dart' show ResultDescriptor, TargetedResult;
-
-class SdkSummaryResultProvider extends ResynthesizerResultProvider {
-  final SummaryTypeProvider typeProvider = new SummaryTypeProvider();
-
-  SdkSummaryResultProvider(
-      InternalAnalysisContext context, PackageBundle bundle, bool strongMode)
-      : super(context, new SummaryDataStore(const <String>[])) {
-    addBundle(null, bundle);
-    createResynthesizer(null, typeProvider);
-    _buildCoreLibrary();
-    _buildAsyncLibrary();
-    resynthesizer.finalizeCoreAsyncLibraries();
-    context.typeProvider = typeProvider;
-  }
-
-  @override
-  bool compute(CacheEntry entry, ResultDescriptor result) {
-    if (result == TYPE_PROVIDER) {
-      entry.setValue(result as ResultDescriptor<TypeProvider>, typeProvider,
-          TargetedResult.EMPTY_LIST);
-      return true;
-    }
-    return super.compute(entry, result);
-  }
-
-  @override
-  bool hasResultsForSource(Source source) {
-    return source != null && source.isInSystemLibrary;
-  }
-
-  void _buildAsyncLibrary() {
-    LibraryElement library = resynthesizer.getLibraryElement('dart:async');
-    typeProvider.initializeAsync(library);
-  }
-
-  void _buildCoreLibrary() {
-    LibraryElement library = resynthesizer.getLibraryElement('dart:core');
-    typeProvider.initializeCore(library);
-  }
-}
-
-/**
- * The implementation of [SummaryResynthesizer] for Dart SDK.
- */
-class SdkSummaryResynthesizer extends SummaryResynthesizer {
-  final PackageBundle bundle;
-  final Map<String, UnlinkedUnit> unlinkedSummaries = <String, UnlinkedUnit>{};
-  final Map<String, LinkedLibrary> linkedSummaries = <String, LinkedLibrary>{};
-
-  SdkSummaryResynthesizer(AnalysisContext context, TypeProvider typeProvider,
-      SourceFactory sourceFactory, this.bundle, bool strongMode)
-      : super(null, context, typeProvider, sourceFactory, strongMode) {
-    for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
-      unlinkedSummaries[bundle.unlinkedUnitUris[i]] = bundle.unlinkedUnits[i];
-    }
-    for (int i = 0; i < bundle.linkedLibraryUris.length; i++) {
-      linkedSummaries[bundle.linkedLibraryUris[i]] = bundle.linkedLibraries[i];
-    }
-  }
-
-  @override
-  LinkedLibrary getLinkedSummary(String uri) {
-    return linkedSummaries[uri];
-  }
-
-  @override
-  UnlinkedUnit getUnlinkedSummary(String uri) {
-    return unlinkedSummaries[uri];
-  }
-
-  @override
-  bool hasLibrarySummary(String uri) {
-    return uri.startsWith('dart:');
-  }
-}
 
 /**
  * An implementation of [DartSdk] which provides analysis results for `dart:`
@@ -143,8 +64,10 @@
       SourceFactory factory = new SourceFactory(
           [new DartUriResolver(this)], null, resourceProvider);
       _analysisContext.sourceFactory = factory;
+      SummaryDataStore dataStore = new SummaryDataStore([]);
+      dataStore.addBundle(null, _bundle);
       _analysisContext.resultProvider =
-          new SdkSummaryResultProvider(_analysisContext, _bundle, strongMode);
+          new InputPackagesResultProvider(_analysisContext, dataStore);
     }
     return _analysisContext;
   }
diff --git a/pkg/analyzer/test/dart/element/builder_test.dart b/pkg/analyzer/test/dart/element/builder_test.dart
index 93faaaf..b441823 100644
--- a/pkg/analyzer/test/dart/element/builder_test.dart
+++ b/pkg/analyzer/test/dart/element/builder_test.dart
@@ -447,6 +447,30 @@
     _assertVisibleRange(parameter, 100, 110);
   }
 
+  void test_visitFunctionTypedFormalParameter_covariant() {
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = _makeBuilder(holder);
+    String parameterName = "p";
+    FunctionTypedFormalParameterImpl formalParameter =
+        AstTestFactory.functionTypedFormalParameter(null, parameterName);
+    formalParameter.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _useParameterInMethod(formalParameter, 100, 110);
+    formalParameter.accept(builder);
+    List<ParameterElement> parameters = holder.parameters;
+    expect(parameters, hasLength(1));
+    ParameterElementImpl parameter = parameters[0];
+    expect(parameter, isNotNull);
+    expect(parameter.name, parameterName);
+    expect(parameter.initializer, isNull);
+    expect(parameter.isConst, isFalse);
+    expect(parameter.isExplicitlyCovariant, isTrue);
+    expect(parameter.isFinal, isFalse);
+    expect(parameter.isSynthetic, isFalse);
+    expect(parameter.parameterKind, ParameterKind.REQUIRED);
+    _assertVisibleRange(parameter, 100, 110);
+  }
+
   void test_visitFunctionTypedFormalParameter_withTypeParameters() {
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = _makeBuilder(holder);
@@ -552,6 +576,39 @@
     expect(initializer.hasImplicitReturnType, isTrue);
   }
 
+  void test_visitNamedFormalParameter_covariant() {
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = _makeBuilder(holder);
+    String parameterName = "p";
+    DefaultFormalParameter formalParameter =
+        AstTestFactory.namedFormalParameter(
+            AstTestFactory.simpleFormalParameter3(parameterName),
+            AstTestFactory.identifier3("42"));
+    (formalParameter.parameter as NormalFormalParameterImpl).covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _useParameterInMethod(formalParameter, 100, 110);
+    formalParameter.beginToken.offset = 50;
+    formalParameter.endToken.offset = 80;
+    formalParameter.accept(builder);
+    List<ParameterElement> parameters = holder.parameters;
+    expect(parameters, hasLength(1));
+    ParameterElementImpl parameter = parameters[0];
+    expect(parameter, isNotNull);
+    assertHasCodeRange(parameter, 50, 32);
+    expect(parameter.name, parameterName);
+    expect(parameter.isConst, isFalse);
+    expect(parameter.isExplicitlyCovariant, isTrue);
+    expect(parameter.isFinal, isFalse);
+    expect(parameter.isSynthetic, isFalse);
+    expect(parameter.parameterKind, ParameterKind.NAMED);
+    _assertVisibleRange(parameter, 100, 110);
+    expect(parameter.defaultValueCode, "42");
+    FunctionElement initializer = parameter.initializer;
+    expect(initializer, isNotNull);
+    expect(initializer.isSynthetic, isTrue);
+    expect(initializer.hasImplicitReturnType, isTrue);
+  }
+
   void test_visitSimpleFormalParameter_noType() {
     // p
     ElementHolder holder = new ElementHolder();
@@ -575,6 +632,32 @@
     _assertVisibleRange(parameter, 100, 110);
   }
 
+  void test_visitSimpleFormalParameter_noType_covariant() {
+    // p
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = _makeBuilder(holder);
+    String parameterName = "p";
+    SimpleFormalParameterImpl formalParameter =
+        AstTestFactory.simpleFormalParameter3(parameterName);
+    formalParameter.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _useParameterInMethod(formalParameter, 100, 110);
+    formalParameter.accept(builder);
+    List<ParameterElement> parameters = holder.parameters;
+    expect(parameters, hasLength(1));
+    ParameterElementImpl parameter = parameters[0];
+    expect(parameter, isNotNull);
+    expect(parameter.hasImplicitType, isTrue);
+    expect(parameter.initializer, isNull);
+    expect(parameter.isConst, isFalse);
+    expect(parameter.isExplicitlyCovariant, isTrue);
+    expect(parameter.isFinal, isFalse);
+    expect(parameter.isSynthetic, isFalse);
+    expect(parameter.name, parameterName);
+    expect(parameter.parameterKind, ParameterKind.REQUIRED);
+    _assertVisibleRange(parameter, 100, 110);
+  }
+
   void test_visitSimpleFormalParameter_type() {
     // T p
     ElementHolder holder = new ElementHolder();
@@ -598,6 +681,57 @@
     _assertVisibleRange(parameter, 100, 110);
   }
 
+  void test_visitSimpleFormalParameter_type_covariant() {
+    // T p
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = _makeBuilder(holder);
+    String parameterName = "p";
+    SimpleFormalParameterImpl formalParameter = AstTestFactory
+        .simpleFormalParameter4(AstTestFactory.typeName4('T'), parameterName);
+    formalParameter.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _useParameterInMethod(formalParameter, 100, 110);
+    formalParameter.accept(builder);
+    List<ParameterElement> parameters = holder.parameters;
+    expect(parameters, hasLength(1));
+    ParameterElementImpl parameter = parameters[0];
+    expect(parameter, isNotNull);
+    expect(parameter.hasImplicitType, isFalse);
+    expect(parameter.initializer, isNull);
+    expect(parameter.isConst, isFalse);
+    expect(parameter.isExplicitlyCovariant, isTrue);
+    expect(parameter.isFinal, isFalse);
+    expect(parameter.isSynthetic, isFalse);
+    expect(parameter.name, parameterName);
+    expect(parameter.parameterKind, ParameterKind.REQUIRED);
+    _assertVisibleRange(parameter, 100, 110);
+  }
+
+  void test_visitVariableDeclaration_field_covariant() {
+    // covariant int f;
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = _makeBuilder(holder);
+    String fieldName = "f";
+    VariableDeclarationImpl variableDeclaration =
+        AstTestFactory.variableDeclaration2(fieldName, null);
+    FieldDeclarationImpl fieldDeclaration = AstTestFactory.fieldDeclaration(
+        false,
+        null,
+        AstTestFactory.typeName4('int'),
+        <VariableDeclaration>[variableDeclaration]);
+    fieldDeclaration.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    variableDeclaration.accept(builder);
+
+    List<FieldElement> fields = holder.fields;
+    expect(fields, hasLength(1));
+    FieldElementImpl field = fields[0];
+    expect(field, isNotNull);
+    PropertyAccessorElementImpl setter = field.setter;
+    expect(setter, isNotNull);
+    expect(setter.parameters[0].isCovariant, isTrue);
+  }
+
   void test_visitVariableDeclaration_inConstructor() {
     List<ConstructorElement> constructors =
         buildElementsForText('class C { C() { var v = 1; } }')
@@ -1094,8 +1228,9 @@
   void
       test_metadata_visitDefaultFormalParameter_functionTypedFormalParameter() {
     ParameterElement parameterElement =
-        buildElementsForText('f([@a g() = null]) {}').functions[0].parameters[
-            0];
+        buildElementsForText('f([@a g() = null]) {}')
+            .functions[0]
+            .parameters[0];
     checkMetadata(parameterElement);
   }
 
diff --git a/pkg/analyzer/test/dart/test_all.dart b/pkg/analyzer/test/dart/test_all.dart
index 7827a63..b1276fe 100644
--- a/pkg/analyzer/test/dart/test_all.dart
+++ b/pkg/analyzer/test/dart/test_all.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer.test.generated.test_all;
+library analyzer.test.dart.test_all;
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/generated/analysis_context_factory.dart b/pkg/analyzer/test/generated/analysis_context_factory.dart
index ffbe349..236a5da 100644
--- a/pkg/analyzer/test/generated/analysis_context_factory.dart
+++ b/pkg/analyzer/test/generated/analysis_context_factory.dart
@@ -141,9 +141,9 @@
       provider.typeType.element
     ];
     coreUnit.functions = <FunctionElement>[
-      ElementFactory.functionElement3("identical", provider.boolType.element,
+      ElementFactory.functionElement3("identical", provider.boolType,
           <ClassElement>[objectClassElement, objectClassElement], null),
-      ElementFactory.functionElement3("print", VoidTypeImpl.instance.element,
+      ElementFactory.functionElement3("print", VoidTypeImpl.instance,
           <ClassElement>[objectClassElement], null)
     ];
     TopLevelVariableElement proxyTopLevelVariableElt = ElementFactory
@@ -190,9 +190,12 @@
     coreContext.setContents(asyncSource, "");
     asyncUnit.librarySource = asyncUnit.source = asyncSource;
     asyncLibrary.definingCompilationUnit = asyncUnit;
-    // Future
+    // Future<T>
     ClassElementImpl futureElement =
         ElementFactory.classElement2("Future", ["T"]);
+    // FutureOr<T>
+    ClassElementImpl futureOrElement =
+      ElementFactory.classElement2("FutureOr", ["T"]);
     futureElement.enclosingElement = asyncUnit;
     //   factory Future.value([value])
     ConstructorElementImpl futureConstructor =
@@ -202,13 +205,15 @@
     ];
     futureConstructor.factory = true;
     futureElement.constructors = <ConstructorElement>[futureConstructor];
-    //   Future then(onValue(T value), { Function onError });
+    //   Future<R> then<R>(FutureOr<R> onValue(T value), { Function onError });
     TypeDefiningElement futureThenR = DynamicElementImpl.instance;
+    DartType onValueReturnType = DynamicTypeImpl.instance;
     if (context.analysisOptions.strongMode) {
       futureThenR = ElementFactory.typeParameterWithType('R');
+      onValueReturnType = futureOrElement.type.instantiate([futureThenR.type]);
     }
     FunctionElementImpl thenOnValue = ElementFactory.functionElement3('onValue',
-        DynamicElementImpl.instance, [futureElement.typeParameters[0]], null);
+        onValueReturnType, [futureElement.typeParameters[0]], null);
     thenOnValue.isSynthetic = true;
 
     DartType futureRType = futureElement.type.instantiate([futureThenR.type]);
@@ -238,6 +243,7 @@
     // Stream
     ClassElementImpl streamElement =
         ElementFactory.classElement2("Stream", ["T"]);
+    streamElement.abstract = true;
     streamElement.constructors = <ConstructorElement>[
       ElementFactory.constructorElement2(streamElement, null)
     ];
@@ -245,7 +251,7 @@
         .instantiate(streamElement.type.typeArguments);
     FunctionElementImpl listenOnData = ElementFactory.functionElement3(
         'onData',
-        VoidTypeImpl.instance.element,
+        VoidTypeImpl.instance,
         <TypeDefiningElement>[streamElement.typeParameters[0]],
         null);
     listenOnData.isSynthetic = true;
@@ -267,6 +273,7 @@
     asyncUnit.types = <ClassElement>[
       completerElement,
       futureElement,
+      futureOrElement,
       streamElement,
       streamSubscriptionElement
     ];
@@ -320,7 +327,7 @@
       ElementFactory.classElement("SelectElement", elementType)
     ];
     htmlUnit.functions = <FunctionElement>[
-      ElementFactory.functionElement3("query", elementElement,
+      ElementFactory.functionElement3("query", elementElement.type,
           <ClassElement>[provider.stringType.element], ClassElement.EMPTY_LIST)
     ];
     TopLevelVariableElementImpl document =
@@ -341,7 +348,7 @@
     mathUnit.librarySource = mathUnit.source = mathSource;
     FunctionElement cosElement = ElementFactory.functionElement3(
         "cos",
-        provider.doubleType.element,
+        provider.doubleType,
         <ClassElement>[provider.numType.element],
         ClassElement.EMPTY_LIST);
     TopLevelVariableElement ln10Element = ElementFactory
@@ -349,7 +356,7 @@
     TypeParameterElement maxT =
         ElementFactory.typeParameterWithType('T', provider.numType);
     FunctionElementImpl maxElement = ElementFactory.functionElement3(
-        "max", maxT, [maxT, maxT], ClassElement.EMPTY_LIST);
+        "max", maxT.type, [maxT, maxT], ClassElement.EMPTY_LIST);
     maxElement.typeParameters = [maxT];
     maxElement.type = new FunctionTypeImpl(maxElement);
     TopLevelVariableElement piElement = ElementFactory.topLevelVariableElement3(
@@ -366,12 +373,12 @@
     randomElement.constructors = <ConstructorElement>[randomConstructor];
     FunctionElement sinElement = ElementFactory.functionElement3(
         "sin",
-        provider.doubleType.element,
+        provider.doubleType,
         <ClassElement>[provider.numType.element],
         ClassElement.EMPTY_LIST);
     FunctionElement sqrtElement = ElementFactory.functionElement3(
         "sqrt",
-        provider.doubleType.element,
+        provider.doubleType,
         <ClassElement>[provider.numType.element],
         ClassElement.EMPTY_LIST);
     mathUnit.accessors = <PropertyAccessorElement>[
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 04e0671..c901d70 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
@@ -16,53 +16,4 @@
 class CompileTimeErrorCodeTest_Driver extends CompileTimeErrorCodeTest {
   @override
   bool get enableNewAnalysisDriver => true;
-
-  @failingTest
-  @override
-  test_fieldInitializerOutsideConstructor_inFunctionTypeParameter() {
-    return super
-        .test_fieldInitializerOutsideConstructor_inFunctionTypeParameter();
-  }
-
-  @failingTest
-  @override
-  test_fromEnvironment_bool_badDefault_whenDefined() {
-    return super.test_fromEnvironment_bool_badDefault_whenDefined();
-  }
-
-  @failingTest
-  @override
-  test_prefixCollidesWithTopLevelMembers_functionTypeAlias() {
-    return super.test_prefixCollidesWithTopLevelMembers_functionTypeAlias();
-  }
-
-  @failingTest
-  @override
-  test_prefixCollidesWithTopLevelMembers_topLevelFunction() {
-    return super.test_prefixCollidesWithTopLevelMembers_topLevelFunction();
-  }
-
-  @failingTest
-  @override
-  test_prefixCollidesWithTopLevelMembers_topLevelVariable() {
-    return super.test_prefixCollidesWithTopLevelMembers_topLevelVariable();
-  }
-
-  @failingTest
-  @override
-  test_prefixCollidesWithTopLevelMembers_type() {
-    return super.test_prefixCollidesWithTopLevelMembers_type();
-  }
-
-  @failingTest
-  @override
-  test_typeAliasCannotReferenceItself_typeVariableBounds() {
-    return super.test_typeAliasCannotReferenceItself_typeVariableBounds();
-  }
-
-  @failingTest
-  @override
-  test_uriDoesNotExist_import_appears_after_deleting_target() {
-    return super.test_uriDoesNotExist_import_appears_after_deleting_target();
-  }
 }
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 6577d9f..aabfe67 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -713,6 +713,18 @@
     verify([source]);
   }
 
+  test_conflictingConstructorNameAndMember_getter() async {
+    Source source = addSource(r'''
+class A {
+  int get x => 42;
+  A.x() {}
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(
+        source, [CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD]);
+    verify([source]);
+  }
+
   test_conflictingConstructorNameAndMember_method() async {
     Source source = addSource(r'''
 class A {
@@ -2414,7 +2426,11 @@
   test_fromEnvironment_bool_badDefault_whenDefined() async {
     // The type of the defaultValue needs to be correct even when the default
     // value isn't used (because the variable is defined in the environment).
-    analysisContext2.declaredVariables.define("x", "true");
+    if (enableNewAnalysisDriver) {
+      driver.declaredVariables.define("x", "true");
+    } else {
+      analysisContext2.declaredVariables.define("x", "true");
+    }
     Source source =
         addSource("var b = const bool.fromEnvironment('x', defaultValue: 1);");
     await computeAnalysisResult(source);
@@ -2757,19 +2773,6 @@
     verify([source]);
   }
 
-  test_importInternalLibrary_js_helper() async {
-    Source source = addSource("import 'dart:_js_helper';");
-    // Note, in these error cases we may generate an UNUSED_IMPORT hint, while
-    // we could prevent the hint from being generated by testing the import
-    // directive for the error, this is such a minor corner case that we don't
-    // think we should add the additional computation time to figure out such
-    // cases.
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
-    verify([source]);
-  }
-
   test_importOfNonLibrary() async {
     Source source = addSource(r'''
 library lib;
@@ -6158,10 +6161,14 @@
     assertErrors(test, [HintCode.UNUSED_IMPORT]);
 
     // Remove the overlay in the same way as AnalysisServer.
-    resourceProvider.deleteFile(resourceProvider.convertPath('/target.dart'));
-    analysisContext2.setContents(target, null);
-    ChangeSet changeSet = new ChangeSet()..removedSource(target);
-    analysisContext2.applyChanges(changeSet);
+    resourceProvider.deleteFile(target.fullName);
+    if (enableNewAnalysisDriver) {
+      driver.removeFile(target.fullName);
+    } else {
+      analysisContext2.setContents(target, null);
+      ChangeSet changeSet = new ChangeSet()..removedSource(target);
+      analysisContext2.applyChanges(changeSet);
+    }
 
     await computeAnalysisResult(test);
     assertErrors(test, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
diff --git a/pkg/analyzer/test/generated/error_suppression_driver_test.dart b/pkg/analyzer/test/generated/error_suppression_driver_test.dart
index 6e2273d..9bc552e 100644
--- a/pkg/analyzer/test/generated/error_suppression_driver_test.dart
+++ b/pkg/analyzer/test/generated/error_suppression_driver_test.dart
@@ -8,7 +8,6 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ErrorSuppressionTest);
     defineReflectiveTests(ErrorSuppressionTest_Driver);
   });
 }
diff --git a/pkg/analyzer/test/generated/gn_test.dart b/pkg/analyzer/test/generated/gn_test.dart
new file mode 100644
index 0000000..060285a8
--- /dev/null
+++ b/pkg/analyzer/test/generated/gn_test.dart
@@ -0,0 +1,132 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.test.generated.gn_test;
+
+import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/src/generated/gn.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(GnPackageUriResolverTest);
+    defineReflectiveTests(GnWorkspaceTest);
+  });
+}
+
+@reflectiveTest
+class GnPackageUriResolverTest extends _BaseTest {
+  GnWorkspace workspace;
+  GnPackageUriResolver resolver;
+
+  void test_resolve() {
+    _addResources([
+      '/workspace/.jiri_root/',
+      '/workspace/out/debug-x87_128/gen/dart.sources/',
+      '/workspace/some/code/',
+      '/workspace/a/source/code.dart',
+    ]);
+    provider.newFile(
+        _p('/workspace/out/debug-x87_128/gen/dart.sources/flutter'),
+        _p('/workspace/a/source'));
+    _setUp();
+    _assertResolve(
+        'package:flutter/code.dart', '/workspace/a/source/code.dart');
+  }
+
+  void test_resolveDoesNotExist() {
+    _addResources([
+      '/workspace/.jiri_root/',
+      '/workspace/out/debug-x87_128/gen/dart.sources/',
+      '/workspace/some/code/',
+      '/workspace/a/source/code.dart',
+    ]);
+    provider.newFile(
+        _p('/workspace/out/debug-x87_128/gen/dart.sources/flutter'),
+        _p('/workspace/a/source'));
+    _setUp();
+    expect(
+        resolver.resolveAbsolute(Uri.parse('package:bogus/code.dart')), null);
+  }
+
+  void _addResources(List<String> paths) {
+    for (String path in paths) {
+      if (path.endsWith('/')) {
+        provider.newFolder(_p(path.substring(0, path.length - 1)));
+      } else {
+        provider.newFile(_p(path), '');
+      }
+    }
+  }
+
+  void _setUp() {
+    workspace = GnWorkspace.find(provider, _p('/workspace'));
+    resolver = new GnPackageUriResolver(workspace);
+  }
+
+  void _assertResolve(String uriStr, String posixPath,
+      {bool exists: true, bool restore: true}) {
+    Uri uri = Uri.parse(uriStr);
+    Source source = resolver.resolveAbsolute(uri);
+    expect(source, isNotNull);
+    expect(source.fullName, _p(posixPath));
+    expect(source.uri, uri);
+    expect(source.exists(), exists);
+    // If enabled, test also "restoreAbsolute".
+    if (restore) {
+      Uri uri = resolver.restoreAbsolute(source);
+      expect(uri.toString(), uriStr);
+    }
+  }
+}
+
+@reflectiveTest
+class GnWorkspaceTest extends _BaseTest {
+  void test_find_notAbsolute() {
+    expect(() => GnWorkspace.find(provider, _p('not_absolute')),
+        throwsArgumentError);
+  }
+
+  void test_find_noJiriRoot() {
+    provider.newFolder(_p('/workspace'));
+    GnWorkspace workspace = GnWorkspace.find(provider, _p('/workspace'));
+    expect(workspace, isNull);
+  }
+
+  void test_find_withRoot() {
+    provider.newFolder(_p('/workspace/.jiri_root'));
+    provider.newFolder(_p('/workspace/out/debug-x87_128/gen/dart.sources'));
+    provider.newFolder(_p('/workspace/some/code'));
+    GnWorkspace workspace =
+        GnWorkspace.find(provider, _p('/workspace/some/code'));
+    expect(workspace, isNotNull);
+    expect(workspace.root, _p('/workspace'));
+  }
+
+  void test_packages() {
+    provider.newFolder(_p('/workspace/.jiri_root'));
+    provider.newFolder(_p('/workspace/out/debug-x87_128/gen/dart.sources'));
+    provider.newFile(
+        _p('/workspace/out/debug-x87_128/gen/dart.sources/flutter'),
+        '/path/to/source');
+    provider.newFolder(_p('/workspace/some/code'));
+    GnWorkspace workspace =
+        GnWorkspace.find(provider, _p('/workspace/some/code'));
+    expect(workspace, isNotNull);
+    expect(workspace.root, _p('/workspace'));
+    expect(workspace.packages.length, 1);
+    expect(workspace.packages['flutter'], '/path/to/source');
+  }
+}
+
+class _BaseTest {
+  final MemoryResourceProvider provider = new MemoryResourceProvider();
+
+  /**
+   * Return the [provider] specific path for the given Posix [path].
+   */
+  String _p(String path) => provider.convertPath(path);
+}
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
index 52b0feb..013ffe2 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -944,6 +944,65 @@
     verify([source]);
   }
 
+  test_deprecatedFunction_class() async {
+    Source source = addSource(r'''
+class Function {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION]);
+    verify([source]);
+  }
+
+  test_deprecatedFunction_extends() async {
+    Source source = addSource(r'''
+class A extends Function {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      HintCode.DEPRECATED_EXTENDS_FUNCTION,
+      StaticWarningCode.FUNCTION_WITHOUT_CALL
+    ]);
+    verify([source]);
+  }
+
+  test_deprecatedFunction_extends2() async {
+    Source source = addSource(r'''
+class Function {}
+class A extends Function {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION,
+      HintCode.DEPRECATED_EXTENDS_FUNCTION
+    ]);
+    verify([source]);
+  }
+
+  test_deprecatedFunction_mixin() async {
+    Source source = addSource(r'''
+class A extends Object with Function {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      HintCode.DEPRECATED_MIXIN_FUNCTION,
+      StaticWarningCode.FUNCTION_WITHOUT_CALL
+    ]);
+    verify([source]);
+  }
+
+  test_deprecatedFunction_mixin2() async {
+    Source source = addSource(r'''
+class Function {}
+class A extends Object with Function {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION,
+      HintCode.DEPRECATED_MIXIN_FUNCTION
+    ]);
+    verify([source]);
+  }
+
   test_divisionOptimization_double() async {
     Source source = addSource(r'''
 f(double x, double y) {
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 a2cdd13..b18fe32 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
@@ -16,89 +16,4 @@
 class NonErrorResolverTest_Driver extends NonErrorResolverTest {
   @override
   bool get enableNewAnalysisDriver => true;
-
-  @failingTest
-  @override
-  test_class_type_alias_documentationComment() {
-    return super.test_class_type_alias_documentationComment();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_beforeConstructor() {
-    return super.test_commentReference_beforeConstructor();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_beforeEnum() {
-    return super.test_commentReference_beforeEnum();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_beforeFunction_blockBody() {
-    return super.test_commentReference_beforeFunction_blockBody();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_beforeFunction_expressionBody() {
-    return super.test_commentReference_beforeFunction_expressionBody();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_beforeFunctionTypeAlias() {
-    return super.test_commentReference_beforeFunctionTypeAlias();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_beforeGetter() {
-    return super.test_commentReference_beforeGetter();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_beforeMethod() {
-    return super.test_commentReference_beforeMethod();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_class() {
-    return super.test_commentReference_class();
-  }
-
-  @failingTest
-  @override
-  test_commentReference_setter() {
-    return super.test_commentReference_setter();
-  }
-
-  @failingTest
-  @override
-  test_invalidAnnotation_constantVariable_field_importWithPrefix() {
-    return super
-        .test_invalidAnnotation_constantVariable_field_importWithPrefix();
-  }
-
-  @failingTest
-  @override
-  test_issue_24191() {
-    return super.test_issue_24191();
-  }
-
-  @failingTest
-  @override
-  test_nativeConstConstructor() {
-    return super.test_nativeConstConstructor();
-  }
-
-  @failingTest
-  @override
-  test_nativeFunctionBodyInNonSDKCode_function() {
-    return super.test_nativeFunctionBodyInNonSDKCode_function();
-  }
 }
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 525e99f..52faa6d 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -1019,10 +1019,10 @@
 
 class D {}
 class E {}''');
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     ClassElement classC =
         resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
     expect(classC.documentationComment, isNotNull);
@@ -1035,10 +1035,10 @@
   A(int p) {}
 }''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     {
       SimpleIdentifier ref =
           EngineTestCase.findSimpleIdentifier(unit, code, "p]");
@@ -1056,10 +1056,10 @@
   WITHOUT_SWORD
 }''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     {
       SimpleIdentifier ref =
           EngineTestCase.findSimpleIdentifier(unit, code, 'Samurai]');
@@ -1089,10 +1089,10 @@
 foo(int p) {
 }''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     SimpleIdentifier ref =
         EngineTestCase.findSimpleIdentifier(unit, code, 'p]');
     expect(ref.staticElement, new isInstanceOf<ParameterElement>());
@@ -1103,10 +1103,10 @@
 /// [p]
 foo(int p) => null;''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     SimpleIdentifier ref =
         EngineTestCase.findSimpleIdentifier(unit, code, 'p]');
     expect(ref.staticElement, new isInstanceOf<ParameterElement>());
@@ -1118,10 +1118,10 @@
 typedef Foo(int p);
 ''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     SimpleIdentifier ref =
         EngineTestCase.findSimpleIdentifier(unit, code, 'p]');
     expect(ref.staticElement, new isInstanceOf<ParameterElement>());
@@ -1134,10 +1134,10 @@
   get g => null;
 }''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     {
       SimpleIdentifier ref =
           EngineTestCase.findSimpleIdentifier(unit, code, 'int]');
@@ -1158,10 +1158,10 @@
   md(int p5, {int p6});
 }''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     assertIsParameter(String search) {
       SimpleIdentifier ref =
           EngineTestCase.findSimpleIdentifier(unit, code, search);
@@ -1183,10 +1183,10 @@
   foo() {}
 }''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     SimpleIdentifier ref =
         EngineTestCase.findSimpleIdentifier(unit, code, 'foo]');
     expect(ref.staticElement, new isInstanceOf<MethodElement>());
@@ -1205,10 +1205,10 @@
 }
 ''';
     Source source = addSource(code);
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
-    CompilationUnit unit = await _getResolvedLibraryUnit(source);
+    CompilationUnit unit = analysisResult.unit;
     {
       SimpleIdentifier ref =
           EngineTestCase.findSimpleIdentifier(unit, code, "x] in A");
@@ -1244,6 +1244,17 @@
     verify([source]);
   }
 
+  test_conflictingConstructorNameAndMember_setter() async {
+    Source source = addSource(r'''
+class A {
+A.x() {}
+set x(_) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
   test_conflictingInstanceGetterAndSuperclassMember_instance() async {
     Source source = addSource(r'''
 class A {
@@ -3364,7 +3375,7 @@
     Source source = addSource('''
 import 'dart:async';
 
-class S extends Stream {}
+abstract class S extends Stream {}
 f(S s) async {
   await for (var v in s) {
     print(v);
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 1979480..77f83b2 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -733,6 +733,13 @@
         "for (var x : list) {}", [ParserErrorCode.COLON_IN_PLACE_OF_IN]);
   }
 
+  void test_constAndCovariant() {
+    createParser('covariant const C f;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.CONST_AND_COVARIANT]);
+  }
+
   void test_constAndFinal() {
     createParser('const final int x;');
     ClassMember member = parser.parseClassMember('C');
@@ -866,6 +873,72 @@
     listener.assertNoErrors();
   }
 
+  void test_covariantAfterVar() {
+    createParser('var covariant f;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.COVARIANT_AFTER_VAR]);
+  }
+
+  void test_covariantAndStatic() {
+    createParser('covariant static A f;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.COVARIANT_AND_STATIC]);
+  }
+
+  void test_covariantConstructor() {
+    createParser('class C { covariant C(); }');
+    ClassDeclaration member =
+        parser.parseCompilationUnitMember(emptyCommentAndMetadata());
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.COVARIANT_CONSTRUCTOR]);
+  }
+
+  void test_covariantMember_getter_noReturnType() {
+    createParser('static covariant get x => 0;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.COVARIANT_MEMBER]);
+  }
+
+  void test_covariantMember_getter_returnType() {
+    createParser('static covariant int get x => 0;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.COVARIANT_MEMBER]);
+  }
+
+  void test_covariantMember_method() {
+    createParser('covariant int m() => 0;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.COVARIANT_MEMBER]);
+  }
+
+  void test_covariantTopLevelDeclaration_class() {
+    createParser('covariant class C {}');
+    ClassDeclaration member =
+        parser.parseCompilationUnitMember(emptyCommentAndMetadata());
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes(
+        [ParserErrorCode.COVARIANT_TOP_LEVEL_DECLARATION]);
+  }
+
+  void test_covariantTopLevelDeclaration_enum() {
+    createParser('covariant enum E { v }');
+    EnumDeclaration member =
+        parser.parseCompilationUnitMember(emptyCommentAndMetadata());
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes(
+        [ParserErrorCode.COVARIANT_TOP_LEVEL_DECLARATION]);
+  }
+
+  void test_covariantTopLevelDeclaration_typedef() {
+    ParserTestCase.parseCompilationUnit("covariant typedef F();",
+        [ParserErrorCode.COVARIANT_TOP_LEVEL_DECLARATION]);
+  }
+
   void test_defaultValueInFunctionType_named_colon() {
     createParser('int x : 0');
     FormalParameter parameter =
@@ -1311,6 +1384,11 @@
         "factory class C {}", [ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION]);
   }
 
+  void test_factoryTopLevelDeclaration_enum() {
+    ParserTestCase.parseCompilationUnit("factory enum E { v }",
+        [ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION]);
+  }
+
   void test_factoryTopLevelDeclaration_typedef() {
     ParserTestCase.parseCompilationUnit("factory typedef F();",
         [ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION]);
@@ -1338,6 +1416,13 @@
         [ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
   }
 
+  void test_finalAndCovariant() {
+    createParser('covariant final f;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrorsWithCodes([ParserErrorCode.FINAL_AND_COVARIANT]);
+  }
+
   void test_finalAndVar() {
     createParser('final var x;');
     ClassMember member = parser.parseClassMember('C');
@@ -2435,6 +2520,11 @@
         "static class C {}", [ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION]);
   }
 
+  void test_staticTopLevelDeclaration_enum() {
+    ParserTestCase.parseCompilationUnit(
+        "static enum E { v }", [ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION]);
+  }
+
   void test_staticTopLevelDeclaration_function() {
     ParserTestCase.parseCompilationUnit(
         "static f() {}", [ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION]);
@@ -5914,6 +6004,25 @@
     expect(constructor.initializers, hasLength(1));
   }
 
+  void test_parseClassMember_field_covariant() {
+    createParser('covariant T f;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertNoErrors();
+    expect(member, new isInstanceOf<FieldDeclaration>());
+    FieldDeclaration field = member;
+    expect(field.covariantKeyword, isNotNull);
+    expect(field.documentationComment, isNull);
+    expect(field.metadata, hasLength(0));
+    expect(field.staticKeyword, isNull);
+    VariableDeclarationList list = field.fields;
+    expect(list, isNotNull);
+    NodeList<VariableDeclaration> variables = list.variables;
+    expect(variables, hasLength(1));
+    VariableDeclaration variable = variables[0];
+    expect(variable.name, isNotNull);
+  }
+
   void test_parseClassMember_field_instance_prefixedType() {
     createParser('p.A f;');
     ClassMember member = parser.parseClassMember('C');
@@ -5921,6 +6030,7 @@
     listener.assertNoErrors();
     expect(member, new isInstanceOf<FieldDeclaration>());
     FieldDeclaration field = member;
+    expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
     expect(field.metadata, hasLength(0));
     expect(field.staticKeyword, isNull);
@@ -5939,6 +6049,7 @@
     listener.assertNoErrors();
     expect(member, new isInstanceOf<FieldDeclaration>());
     FieldDeclaration field = member;
+    expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
     expect(field.metadata, hasLength(0));
     expect(field.staticKeyword, isNull);
@@ -5957,6 +6068,7 @@
     listener.assertNoErrors();
     expect(member, new isInstanceOf<FieldDeclaration>());
     FieldDeclaration field = member;
+    expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
     expect(field.metadata, hasLength(0));
     expect(field.staticKeyword, isNull);
@@ -5975,6 +6087,7 @@
     listener.assertNoErrors();
     expect(member, new isInstanceOf<FieldDeclaration>());
     FieldDeclaration field = member;
+    expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
     expect(field.metadata, hasLength(0));
     expect(field.staticKeyword, isNull);
@@ -5994,6 +6107,7 @@
     listener.assertNoErrors();
     expect(member, new isInstanceOf<FieldDeclaration>());
     FieldDeclaration field = member;
+    expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
     expect(field.metadata, hasLength(0));
     expect(field.staticKeyword, isNull);
@@ -6005,6 +6119,25 @@
     expect(variable.name, isNotNull);
   }
 
+  void test_parseClassMember_field_static() {
+    createParser('static A f;');
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertNoErrors();
+    expect(member, new isInstanceOf<FieldDeclaration>());
+    FieldDeclaration field = member;
+    expect(field.covariantKeyword, isNull);
+    expect(field.documentationComment, isNull);
+    expect(field.metadata, hasLength(0));
+    expect(field.staticKeyword, isNotNull);
+    VariableDeclarationList list = field.fields;
+    expect(list, isNotNull);
+    NodeList<VariableDeclaration> variables = list.variables;
+    expect(variables, hasLength(1));
+    VariableDeclaration variable = variables[0];
+    expect(variable.name, isNotNull);
+  }
+
   @failingTest
   void test_parseClassMember_getter_functionType() {
     createParser('int Function(int) get g {}');
@@ -8710,9 +8843,9 @@
     expect(result.type, isNotNull);
   }
 
-  void test_parseFormalParameter_final_withType_named() {
+  void test_parseFormalParameter_covariant_final_named() {
     ParameterKind kind = ParameterKind.NAMED;
-    createParser('final A a : null');
+    createParser('covariant final a : null');
     FormalParameter parameter = parser.parseFormalParameter(kind);
     expectNotNullIfNoErrors(parameter);
     listener.assertNoErrors();
@@ -8720,6 +8853,62 @@
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_final_normal() {
+    ParameterKind kind = ParameterKind.REQUIRED;
+    createParser('covariant final a');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_final_positional() {
+    ParameterKind kind = ParameterKind.POSITIONAL;
+    createParser('covariant final a = null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_final_type_named() {
+    ParameterKind kind = ParameterKind.NAMED;
+    createParser('covariant final A a : null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNotNull);
@@ -8729,23 +8918,24 @@
     expect(defaultParameter.kind, kind);
   }
 
-  void test_parseFormalParameter_final_withType_normal() {
+  void test_parseFormalParameter_covariant_final_type_normal() {
     ParameterKind kind = ParameterKind.REQUIRED;
-    createParser('final A a');
+    createParser('covariant final A a');
     FormalParameter parameter = parser.parseFormalParameter(kind);
     expectNotNullIfNoErrors(parameter);
     listener.assertNoErrors();
     expect(parameter, new isInstanceOf<SimpleFormalParameter>());
     SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNotNull);
     expect(simpleParameter.kind, kind);
   }
 
-  void test_parseFormalParameter_final_withType_positional() {
+  void test_parseFormalParameter_covariant_final_type_positional() {
     ParameterKind kind = ParameterKind.POSITIONAL;
-    createParser('final A a = null');
+    createParser('covariant final A a = null');
     FormalParameter parameter = parser.parseFormalParameter(kind);
     expectNotNullIfNoErrors(parameter);
     listener.assertNoErrors();
@@ -8753,6 +8943,7 @@
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNotNull);
@@ -8763,7 +8954,243 @@
   }
 
   @failingTest
-  void test_parseFormalParameter_nonFinal_withType_function() {
+  void test_parseFormalParameter_covariant_type_function() {
+    ParameterKind kind = ParameterKind.REQUIRED;
+    createParser('covariant String Function(int) a');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNull);
+    expect(simpleParameter.type, new isInstanceOf<GenericFunctionType>());
+    expect(simpleParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_type_named() {
+    ParameterKind kind = ParameterKind.NAMED;
+    createParser('covariant A a : null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNull);
+    expect(simpleParameter.type, isNotNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_type_normal() {
+    ParameterKind kind = ParameterKind.REQUIRED;
+    createParser('covariant A<B<C>> a');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNull);
+    expect(simpleParameter.type, isNotNull);
+    expect(simpleParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_type_positional() {
+    ParameterKind kind = ParameterKind.POSITIONAL;
+    createParser('covariant A a = null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNull);
+    expect(simpleParameter.type, isNotNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_var_named() {
+    ParameterKind kind = ParameterKind.NAMED;
+    createParser('covariant var a : null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_var_normal() {
+    ParameterKind kind = ParameterKind.REQUIRED;
+    createParser('covariant var a');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_covariant_var_positional() {
+    ParameterKind kind = ParameterKind.POSITIONAL;
+    createParser('covariant var a = null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNotNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_final_named() {
+    ParameterKind kind = ParameterKind.NAMED;
+    createParser('final a : null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_final_normal() {
+    ParameterKind kind = ParameterKind.REQUIRED;
+    createParser('final a');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_final_positional() {
+    ParameterKind kind = ParameterKind.POSITIONAL;
+    createParser('final a = null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_final_type_named() {
+    ParameterKind kind = ParameterKind.NAMED;
+    createParser('final A a : null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNotNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_final_type_normal() {
+    ParameterKind kind = ParameterKind.REQUIRED;
+    createParser('final A a');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNotNull);
+    expect(simpleParameter.kind, kind);
+  }
+
+  void test_parseFormalParameter_final_type_positional() {
+    ParameterKind kind = ParameterKind.POSITIONAL;
+    createParser('final A a = null');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<DefaultFormalParameter>());
+    DefaultFormalParameter defaultParameter = parameter;
+    SimpleFormalParameter simpleParameter =
+        defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNotNull);
+    expect(simpleParameter.kind, kind);
+    expect(defaultParameter.separator, isNotNull);
+    expect(defaultParameter.defaultValue, isNotNull);
+    expect(defaultParameter.kind, kind);
+  }
+
+  @failingTest
+  void test_parseFormalParameter_type_function() {
     ParameterKind kind = ParameterKind.REQUIRED;
     createParser('String Function(int) a');
     FormalParameter parameter = parser.parseFormalParameter(kind);
@@ -8771,13 +9198,14 @@
     listener.assertNoErrors();
     expect(parameter, new isInstanceOf<SimpleFormalParameter>());
     SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNull);
     expect(simpleParameter.type, new isInstanceOf<GenericFunctionType>());
     expect(simpleParameter.kind, kind);
   }
 
-  void test_parseFormalParameter_nonFinal_withType_named() {
+  void test_parseFormalParameter_type_named() {
     ParameterKind kind = ParameterKind.NAMED;
     createParser('A a : null');
     FormalParameter parameter = parser.parseFormalParameter(kind);
@@ -8787,6 +9215,7 @@
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNull);
     expect(simpleParameter.type, isNotNull);
@@ -8796,7 +9225,7 @@
     expect(defaultParameter.kind, kind);
   }
 
-  void test_parseFormalParameter_nonFinal_withType_normal() {
+  void test_parseFormalParameter_type_normal() {
     ParameterKind kind = ParameterKind.REQUIRED;
     createParser('A a');
     FormalParameter parameter = parser.parseFormalParameter(kind);
@@ -8804,13 +9233,14 @@
     listener.assertNoErrors();
     expect(parameter, new isInstanceOf<SimpleFormalParameter>());
     SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNull);
     expect(simpleParameter.type, isNotNull);
     expect(simpleParameter.kind, kind);
   }
 
-  void test_parseFormalParameter_nonFinal_withType_positional() {
+  void test_parseFormalParameter_type_positional() {
     ParameterKind kind = ParameterKind.POSITIONAL;
     createParser('A a = null');
     FormalParameter parameter = parser.parseFormalParameter(kind);
@@ -8820,6 +9250,7 @@
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNull);
     expect(simpleParameter.type, isNotNull);
@@ -8829,20 +9260,6 @@
     expect(defaultParameter.kind, kind);
   }
 
-  void test_parseFormalParameter_var() {
-    ParameterKind kind = ParameterKind.REQUIRED;
-    createParser('var a');
-    FormalParameter parameter = parser.parseFormalParameter(kind);
-    expectNotNullIfNoErrors(parameter);
-    listener.assertNoErrors();
-    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
-    SimpleFormalParameter simpleParameter = parameter;
-    expect(simpleParameter.identifier, isNotNull);
-    expect(simpleParameter.keyword, isNotNull);
-    expect(simpleParameter.type, isNull);
-    expect(simpleParameter.kind, kind);
-  }
-
   void test_parseFormalParameter_var_named() {
     ParameterKind kind = ParameterKind.NAMED;
     createParser('var a : null');
@@ -8853,6 +9270,7 @@
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNull);
@@ -8862,6 +9280,21 @@
     expect(defaultParameter.kind, kind);
   }
 
+  void test_parseFormalParameter_var_normal() {
+    ParameterKind kind = ParameterKind.REQUIRED;
+    createParser('var a');
+    FormalParameter parameter = parser.parseFormalParameter(kind);
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+    expect(simpleParameter.keyword, isNotNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.kind, kind);
+  }
+
   void test_parseFormalParameter_var_positional() {
     ParameterKind kind = ParameterKind.POSITIONAL;
     createParser('var a = null');
@@ -8872,6 +9305,7 @@
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
+    expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNull);
@@ -10052,7 +10486,7 @@
         astFactory.typeName(astFactory.simpleIdentifier(null), null);
     createParser("a = 1, b, c = 3;");
     FieldDeclaration declaration = parser.parseInitializedIdentifierList(
-        commentAndMetadata(comment), staticKeyword, null, type);
+        commentAndMetadata(comment), staticKeyword, null, null, type);
     expectNotNullIfNoErrors(declaration);
     listener.assertNoErrors();
     expect(declaration.documentationComment, comment);
@@ -10071,7 +10505,7 @@
     Token varKeyword = TokenFactory.tokenFromKeyword(Keyword.VAR);
     createParser('a = 1, b, c = 3;');
     FieldDeclaration declaration = parser.parseInitializedIdentifierList(
-        commentAndMetadata(comment), staticKeyword, varKeyword, null);
+        commentAndMetadata(comment), staticKeyword, null, varKeyword, null);
     expectNotNullIfNoErrors(declaration);
     listener.assertNoErrors();
     expect(declaration.documentationComment, comment);
@@ -10589,6 +11023,14 @@
     expect(modifiers.constKeyword, isNotNull);
   }
 
+  void test_parseModifiers_covariant() {
+    createParser('covariant A');
+    Modifiers modifiers = parser.parseModifiers();
+    expectNotNullIfNoErrors(modifiers);
+    listener.assertNoErrors();
+    expect(modifiers.covariantKeyword, isNotNull);
+  }
+
   void test_parseModifiers_external() {
     createParser('external A');
     Modifiers modifiers = parser.parseModifiers();
@@ -11258,6 +11700,19 @@
     expect(simpleParameter.identifier, isNotNull);
   }
 
+  void test_parseNormalFormalParameter_simple_noType_namedCovariant() {
+    createParser('covariant)');
+    NormalFormalParameter parameter = parser.parseNormalFormalParameter();
+    expectNotNullIfNoErrors(parameter);
+    listener.assertNoErrors();
+    expect(parameter, new isInstanceOf<SimpleFormalParameter>());
+    SimpleFormalParameter simpleParameter = parameter;
+    expect(simpleParameter.covariantKeyword, isNull);
+    expect(simpleParameter.keyword, isNull);
+    expect(simpleParameter.type, isNull);
+    expect(simpleParameter.identifier, isNotNull);
+  }
+
   void test_parseNormalFormalParameter_simple_type() {
     createParser('A a)');
     NormalFormalParameter parameter = parser.parseNormalFormalParameter();
@@ -13189,7 +13644,8 @@
   @failingTest
   void test_parseTypeAnnotation_function_returnType_function() {
     createParser('A Function(B, C) Function(D) v');
-    GenericFunctionType functionType = parser.parseTypeAnnotation(false);
+    // TODO(scheglov) improve the test to verify also the node properties
+    var functionType = parser.parseTypeAnnotation(false) as GenericFunctionType;
     expectNotNullIfNoErrors(functionType);
     listener.assertNoErrors();
   }
@@ -13240,7 +13696,8 @@
   @failingTest
   void test_parseTypeAnnotation_function_returnType_simple() {
     createParser('A Function(B, C) v');
-    GenericFunctionType functionType = parser.parseTypeAnnotation(false);
+    // TODO(scheglov) improve the test to verify also the node properties
+    var functionType = parser.parseTypeAnnotation(false) as GenericFunctionType;
     expectNotNullIfNoErrors(functionType);
     listener.assertNoErrors();
   }
@@ -13281,7 +13738,8 @@
   @failingTest
   void test_parseTypeAnnotation_function_returnType_withArguments() {
     createParser('A<B> Function(C) v');
-    GenericFunctionType functionType = parser.parseTypeAnnotation(false);
+    // TODO(scheglov) improve this test to verify also the node properties
+    var functionType = parser.parseTypeAnnotation(false) as GenericFunctionType;
     expectNotNullIfNoErrors(functionType);
     listener.assertNoErrors();
   }
diff --git a/pkg/analyzer/test/generated/resolver_driver_test.dart b/pkg/analyzer/test/generated/resolver_driver_test.dart
index 0d060ce..74af34f 100644
--- a/pkg/analyzer/test/generated/resolver_driver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_driver_test.dart
@@ -23,10 +23,4 @@
 class TypePropagationTest_Driver extends TypePropagationTest {
   @override
   bool get enableNewAnalysisDriver => true;
-
-  @failingTest
-  @override
-  test_query() {
-    return super.test_query();
-  }
 }
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 0cd462c..957d94c 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -946,8 +946,7 @@
 class TypePropagationTest extends ResolverTestCase {
   fail_mergePropagatedTypesAtJoinPoint_1() async {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f1(x) {
   var y = [];
   if (x) {
@@ -958,15 +957,14 @@
   // Propagated type is [List] here: incorrect.
   // Best we can do is [Object]?
   return y; // marker
-}''',
-        null,
-        typeProvider.dynamicType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.dynamicType);
   }
 
   fail_mergePropagatedTypesAtJoinPoint_2() async {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f2(x) {
   var y = [];
   if (x) {
@@ -976,15 +974,14 @@
   // Propagated type is [List] here: incorrect.
   // Best we can do is [Object]?
   return y; // marker
-}''',
-        null,
-        typeProvider.dynamicType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.dynamicType);
   }
 
   fail_mergePropagatedTypesAtJoinPoint_3() async {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f4(x) {
   var y = [];
   if (x) {
@@ -996,15 +993,14 @@
   // A correct answer is the least upper bound of [int] and [double],
   // i.e. [num].
   return y; // marker
-}''',
-        null,
-        typeProvider.numType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.numType);
   }
 
   fail_mergePropagatedTypesAtJoinPoint_5() async {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f6(x,y) {
   var z = [];
   if (x || (z = y) < 0) {
@@ -1014,9 +1010,9 @@
   // Propagated type is [List] here: incorrect.
   // Best we can do is [Object]?
   return z; // marker
-}''',
-        null,
-        typeProvider.dynamicType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.dynamicType);
   }
 
   fail_mergePropagatedTypesAtJoinPoint_7() async {
@@ -1043,8 +1039,9 @@
     x; // marker
   }
 }''';
+    CompilationUnit unit = await resolveSource(code);
     DartType t =
-        (await findMarkedIdentifier(code, "; // marker")).propagatedType;
+        findMarkedIdentifier(code, unit, "; // marker").propagatedType;
     expect(typeProvider.intType.isSubtypeOf(t), isTrue);
     expect(typeProvider.stringType.isSubtypeOf(t), isTrue);
   }
@@ -1076,8 +1073,9 @@
     }
   }
 }''';
+    CompilationUnit unit = await resolveSource(code);
     DartType t =
-        (await findMarkedIdentifier(code, "; // marker")).propagatedType;
+        findMarkedIdentifier(code, unit, "; // marker").propagatedType;
     expect(typeProvider.intType.isSubtypeOf(t), isTrue);
     expect(typeProvider.stringType.isSubtypeOf(t), isTrue);
   }
@@ -1088,8 +1086,9 @@
 main() {
   var v = (() {return 42;})();
 }''';
-    await assertPropagatedAssignedType(
-        code, typeProvider.dynamicType, typeProvider.intType);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(
+        code, unit, typeProvider.dynamicType, typeProvider.intType);
   }
 
   test_as() async {
@@ -1150,7 +1149,7 @@
         function.functionExpression.body as BlockFunctionBody;
     ReturnStatement statement = body.block.statements[2] as ReturnStatement;
     SimpleIdentifier variableName = statement.expression as SimpleIdentifier;
-    expect(variableName.propagatedType, same(typeProvider.intType));
+    expect(variableName.propagatedType, typeProvider.intType);
   }
 
   test_assignment_afterInitializer() async {
@@ -1166,7 +1165,7 @@
         function.functionExpression.body as BlockFunctionBody;
     ReturnStatement statement = body.block.statements[2] as ReturnStatement;
     SimpleIdentifier variableName = statement.expression as SimpleIdentifier;
-    expect(variableName.propagatedType, same(typeProvider.doubleType));
+    expect(variableName.propagatedType, typeProvider.doubleType);
   }
 
   test_assignment_null() async {
@@ -1187,20 +1186,20 @@
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "v; // declare", (node) => node is SimpleIdentifier);
-      expect(identifier.staticType, same(typeProvider.intType));
-      expect(identifier.propagatedType, same(null));
+      expect(identifier.staticType, typeProvider.intType);
+      expect(identifier.propagatedType, isNull);
     }
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "v = null;", (node) => node is SimpleIdentifier);
-      expect(identifier.staticType, same(typeProvider.intType));
-      expect(identifier.propagatedType, same(null));
+      expect(identifier.staticType, typeProvider.intType);
+      expect(identifier.propagatedType, isNull);
     }
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "v; // return", (node) => node is SimpleIdentifier);
-      expect(identifier.staticType, same(typeProvider.intType));
-      expect(identifier.propagatedType, same(null));
+      expect(identifier.staticType, typeProvider.intType);
+      expect(identifier.propagatedType, isNull);
     }
   }
 
@@ -1217,7 +1216,7 @@
         function.functionExpression.body as BlockFunctionBody;
     ReturnStatement statement = body.block.statements[2] as ReturnStatement;
     SimpleIdentifier variableName = statement.expression as SimpleIdentifier;
-    expect(variableName.propagatedType, same(typeProvider.intType));
+    expect(variableName.propagatedType, typeProvider.intType);
   }
 
   test_CanvasElement_getContext() async {
@@ -1244,18 +1243,17 @@
 }''';
     Source source = addSource(code);
     CompilationUnit unit = await _computeResolvedUnit(source);
-    InterfaceType stringType = typeProvider.stringType;
     // in the declaration
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "e in", (node) => node is SimpleIdentifier);
-      expect(identifier.propagatedType, same(stringType));
+      expect(identifier.propagatedType, typeProvider.stringType);
     }
     // in the loop body
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "e;", (node) => node is SimpleIdentifier);
-      expect(identifier.propagatedType, same(stringType));
+      expect(identifier.propagatedType, typeProvider.stringType);
     }
   }
 
@@ -1269,18 +1267,17 @@
 }''';
     Source source = addSource(code);
     CompilationUnit unit = await _computeResolvedUnit(source);
-    InterfaceType stringType = typeProvider.stringType;
     // in the declaration
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "e in", (node) => node is SimpleIdentifier);
-      expect(identifier.propagatedType, same(stringType));
+      expect(identifier.propagatedType, typeProvider.stringType);
     }
     // in the loop body
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "e;", (node) => node is SimpleIdentifier);
-      expect(identifier.propagatedType, same(stringType));
+      expect(identifier.propagatedType, typeProvider.stringType);
     }
   }
 
@@ -1328,23 +1325,21 @@
     Source source = addSource(code);
     CompilationUnit unit = await _computeResolvedUnit(source);
     // k
-    DartType intType = typeProvider.intType;
     FormalParameter kParameter = EngineTestCase.findNode(
         unit, code, "k, ", (node) => node is SimpleFormalParameter);
-    expect(kParameter.identifier.propagatedType, same(intType));
+    expect(kParameter.identifier.propagatedType, typeProvider.intType);
     SimpleIdentifier kIdentifier = EngineTestCase.findNode(
         unit, code, "k;", (node) => node is SimpleIdentifier);
-    expect(kIdentifier.propagatedType, same(intType));
-    expect(kIdentifier.staticType, same(typeProvider.dynamicType));
+    expect(kIdentifier.propagatedType, typeProvider.intType);
+    expect(kIdentifier.staticType, typeProvider.dynamicType);
     // v
-    DartType stringType = typeProvider.stringType;
     FormalParameter vParameter = EngineTestCase.findNode(
         unit, code, "v)", (node) => node is SimpleFormalParameter);
-    expect(vParameter.identifier.propagatedType, same(stringType));
+    expect(vParameter.identifier.propagatedType, typeProvider.stringType);
     SimpleIdentifier vIdentifier = EngineTestCase.findNode(
         unit, code, "v;", (node) => node is SimpleIdentifier);
-    expect(vIdentifier.propagatedType, same(stringType));
-    expect(vIdentifier.staticType, same(typeProvider.dynamicType));
+    expect(vIdentifier.propagatedType, typeProvider.stringType);
+    expect(vIdentifier.staticType, typeProvider.dynamicType);
   }
 
   test_functionExpression_asInvocationArgument_fromInferredInvocation() async {
@@ -1359,15 +1354,13 @@
     Source source = addSource(code);
     CompilationUnit unit = await _computeResolvedUnit(source);
     // k
-    DartType intType = typeProvider.intType;
     FormalParameter kParameter = EngineTestCase.findNode(
         unit, code, "k, ", (node) => node is SimpleFormalParameter);
-    expect(kParameter.identifier.propagatedType, same(intType));
+    expect(kParameter.identifier.propagatedType, typeProvider.intType);
     // v
-    DartType stringType = typeProvider.stringType;
     FormalParameter vParameter = EngineTestCase.findNode(
         unit, code, "v)", (node) => node is SimpleFormalParameter);
-    expect(vParameter.identifier.propagatedType, same(stringType));
+    expect(vParameter.identifier.propagatedType, typeProvider.stringType);
   }
 
   test_functionExpression_asInvocationArgument_functionExpressionInvocation() async {
@@ -1380,16 +1373,14 @@
     Source source = addSource(code);
     CompilationUnit unit = await _computeResolvedUnit(source);
     // v
-    DartType dynamicType = typeProvider.dynamicType;
-    DartType stringType = typeProvider.stringType;
     FormalParameter vParameter = EngineTestCase.findNode(
         unit, code, "v)", (node) => node is FormalParameter);
-    expect(vParameter.identifier.propagatedType, same(stringType));
-    expect(vParameter.identifier.staticType, same(dynamicType));
+    expect(vParameter.identifier.propagatedType, typeProvider.stringType);
+    expect(vParameter.identifier.staticType, typeProvider.dynamicType);
     SimpleIdentifier vIdentifier = EngineTestCase.findNode(
         unit, code, "v;", (node) => node is SimpleIdentifier);
-    expect(vIdentifier.propagatedType, same(stringType));
-    expect(vIdentifier.staticType, same(dynamicType));
+    expect(vIdentifier.propagatedType, typeProvider.stringType);
+    expect(vIdentifier.staticType, typeProvider.dynamicType);
   }
 
   test_functionExpression_asInvocationArgument_keepIfLessSpecific() async {
@@ -1405,15 +1396,14 @@
     Source source = addSource(code);
     CompilationUnit unit = await _computeResolvedUnit(source);
     // v
-    DartType intType = typeProvider.intType;
     FormalParameter vParameter = EngineTestCase.findNode(
         unit, code, "v)", (node) => node is SimpleFormalParameter);
-    expect(vParameter.identifier.propagatedType, same(null));
-    expect(vParameter.identifier.staticType, same(intType));
+    expect(vParameter.identifier.propagatedType, isNull);
+    expect(vParameter.identifier.staticType, typeProvider.intType);
     SimpleIdentifier vIdentifier = EngineTestCase.findNode(
         unit, code, "v;", (node) => node is SimpleIdentifier);
-    expect(vIdentifier.staticType, same(intType));
-    expect(vIdentifier.propagatedType, same(null));
+    expect(vIdentifier.staticType, typeProvider.intType);
+    expect(vIdentifier.propagatedType, isNull);
   }
 
   test_functionExpression_asInvocationArgument_notSubtypeOfStaticType() async {
@@ -1433,7 +1423,7 @@
         unit, code, "() => 0)", (node) => node is FunctionExpression);
     expect((functionExpression.staticType as FunctionType).parameters.length,
         same(0));
-    expect(functionExpression.propagatedType, same(null));
+    expect(functionExpression.propagatedType, isNull);
   }
 
   test_functionExpression_asInvocationArgument_replaceIfMoreSpecific() async {
@@ -1449,14 +1439,13 @@
     Source source = addSource(code);
     CompilationUnit unit = await _computeResolvedUnit(source);
     // v
-    DartType stringType = typeProvider.stringType;
     FormalParameter vParameter = EngineTestCase.findNode(
         unit, code, "v)", (node) => node is SimpleFormalParameter);
-    expect(vParameter.identifier.propagatedType, same(stringType));
-    expect(vParameter.identifier.staticType, same(typeProvider.objectType));
+    expect(vParameter.identifier.propagatedType, typeProvider.stringType);
+    expect(vParameter.identifier.staticType, typeProvider.objectType);
     SimpleIdentifier vIdentifier = EngineTestCase.findNode(
         unit, code, "v;", (node) => node is SimpleIdentifier);
-    expect(vIdentifier.propagatedType, same(stringType));
+    expect(vIdentifier.propagatedType, typeProvider.stringType);
   }
 
   test_Future_then() async {
@@ -1475,15 +1464,15 @@
     // p1
     FormalParameter p1 = EngineTestCase.findNode(
         unit, code, "p1) {", (node) => node is SimpleFormalParameter);
-    expect(p1.identifier.propagatedType, same(typeProvider.intType));
+    expect(p1.identifier.propagatedType, typeProvider.intType);
     // p2
     FormalParameter p2 = EngineTestCase.findNode(
         unit, code, "p2) {", (node) => node is SimpleFormalParameter);
-    expect(p2.identifier.propagatedType, same(typeProvider.doubleType));
+    expect(p2.identifier.propagatedType, typeProvider.doubleType);
     // p3
     FormalParameter p3 = EngineTestCase.findNode(
         unit, code, "p3) {", (node) => node is SimpleFormalParameter);
-    expect(p3.identifier.propagatedType, same(typeProvider.stringType));
+    expect(p3.identifier.propagatedType, typeProvider.stringType);
   }
 
   test_initializer() async {
@@ -1502,14 +1491,14 @@
       VariableDeclarationStatement statement =
           statements[0] as VariableDeclarationStatement;
       SimpleIdentifier variableName = statement.variables.variables[0].name;
-      expect(variableName.staticType, same(typeProvider.dynamicType));
-      expect(variableName.propagatedType, same(typeProvider.intType));
+      expect(variableName.staticType, typeProvider.dynamicType);
+      expect(variableName.propagatedType, typeProvider.intType);
     }
     // Type of 'v' in reference.
     {
       ReturnStatement statement = statements[1] as ReturnStatement;
       SimpleIdentifier variableName = statement.expression as SimpleIdentifier;
-      expect(variableName.propagatedType, same(typeProvider.intType));
+      expect(variableName.propagatedType, typeProvider.intType);
     }
   }
 
@@ -1527,7 +1516,7 @@
         body.block.statements[1] as ExpressionStatement;
     PrefixedIdentifier invocation = statement.expression as PrefixedIdentifier;
     SimpleIdentifier variableName = invocation.prefix;
-    expect(variableName.propagatedType, same(typeProvider.stringType));
+    expect(variableName.propagatedType, typeProvider.stringType);
   }
 
   test_initializer_hasStaticType() async {
@@ -1546,14 +1535,14 @@
       VariableDeclarationStatement statement =
           statements[0] as VariableDeclarationStatement;
       SimpleIdentifier variableName = statement.variables.variables[0].name;
-      expect(variableName.staticType, same(typeProvider.intType));
+      expect(variableName.staticType, typeProvider.intType);
       expect(variableName.propagatedType, isNull);
     }
     // Type of 'v' in reference.
     {
       ReturnStatement statement = statements[1] as ReturnStatement;
       SimpleIdentifier variableName = statement.expression as SimpleIdentifier;
-      expect(variableName.staticType, same(typeProvider.intType));
+      expect(variableName.staticType, typeProvider.intType);
       expect(variableName.propagatedType, isNull);
     }
   }
@@ -1600,14 +1589,14 @@
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "v = null;", (node) => node is SimpleIdentifier);
-      expect(identifier.staticType, same(typeProvider.intType));
-      expect(identifier.propagatedType, same(null));
+      expect(identifier.staticType, typeProvider.intType);
+      expect(identifier.propagatedType, isNull);
     }
     {
       SimpleIdentifier identifier = EngineTestCase.findNode(
           unit, code, "v; // marker", (node) => node is SimpleIdentifier);
-      expect(identifier.staticType, same(typeProvider.intType));
-      expect(identifier.propagatedType, same(null));
+      expect(identifier.staticType, typeProvider.intType);
+      expect(identifier.propagatedType, isNull);
     }
   }
 
@@ -1638,8 +1627,9 @@
 main() {
   helper.max(10, 10); // marker
 }''';
+    CompilationUnit unit = await resolveSource(code);
     SimpleIdentifier methodName =
-        await findMarkedIdentifier(code, "(10, 10); // marker");
+        findMarkedIdentifier(code, unit, "(10, 10); // marker");
     MethodInvocation methodInvoke = methodName.parent;
     expect(methodInvoke.methodName.staticElement, isNotNull);
     expect(methodInvoke.methodName.propagatedElement, isNull);
@@ -1721,7 +1711,7 @@
     ReturnStatement statement =
         (ifStatement.thenStatement as Block).statements[0] as ReturnStatement;
     SimpleIdentifier variableName = statement.expression as SimpleIdentifier;
-    expect(variableName.propagatedType, same(null));
+    expect(variableName.propagatedType, isNull);
   }
 
   test_is_if_logicalAnd() async {
@@ -1976,8 +1966,9 @@
     return a; // marker
   }
 }''';
-    DartType tB = (await findMarkedIdentifier(code, "; // B")).propagatedType;
-    await assertTypeOfMarkedExpression(code, null, tB);
+    CompilationUnit unit = await resolveSource(code);
+    DartType tB = findMarkedIdentifier(code, unit, "; // B").propagatedType;
+    assertTypeOfMarkedExpression(code, unit, null, tB);
   }
 
   test_issue20904BuggyTypePromotionAtIfJoin_6() async {
@@ -1996,8 +1987,9 @@
     return b; // marker
   }
 }''';
-    DartType tB = (await findMarkedIdentifier(code, "; // B")).propagatedType;
-    await assertTypeOfMarkedExpression(code, null, tB);
+    CompilationUnit unit = await resolveSource(code);
+    DartType tB = findMarkedIdentifier(code, unit, "; // B").propagatedType;
+    assertTypeOfMarkedExpression(code, unit, null, tB);
   }
 
   test_listLiteral_different() async {
@@ -2030,10 +2022,10 @@
     expect(indexExpression.propagatedType, isNull);
     Expression v = indexExpression.target;
     InterfaceType propagatedType = v.propagatedType as InterfaceType;
-    expect(propagatedType.element, same(typeProvider.listType.element));
+    expect(propagatedType.element, typeProvider.listType.element);
     List<DartType> typeArguments = propagatedType.typeArguments;
     expect(typeArguments, hasLength(1));
-    expect(typeArguments[0], same(typeProvider.dynamicType));
+    expect(typeArguments[0], typeProvider.dynamicType);
   }
 
   test_mapLiteral_different() async {
@@ -2049,11 +2041,11 @@
     ReturnStatement statement = body.block.statements[1] as ReturnStatement;
     SimpleIdentifier identifier = statement.expression as SimpleIdentifier;
     InterfaceType propagatedType = identifier.propagatedType as InterfaceType;
-    expect(propagatedType.element, same(typeProvider.mapType.element));
+    expect(propagatedType.element, typeProvider.mapType.element);
     List<DartType> typeArguments = propagatedType.typeArguments;
     expect(typeArguments, hasLength(2));
-    expect(typeArguments[0], same(typeProvider.dynamicType));
-    expect(typeArguments[1], same(typeProvider.dynamicType));
+    expect(typeArguments[0], typeProvider.dynamicType);
+    expect(typeArguments[1], typeProvider.dynamicType);
   }
 
   test_mapLiteral_same() async {
@@ -2069,11 +2061,11 @@
     ReturnStatement statement = body.block.statements[1] as ReturnStatement;
     SimpleIdentifier identifier = statement.expression as SimpleIdentifier;
     InterfaceType propagatedType = identifier.propagatedType as InterfaceType;
-    expect(propagatedType.element, same(typeProvider.mapType.element));
+    expect(propagatedType.element, typeProvider.mapType.element);
     List<DartType> typeArguments = propagatedType.typeArguments;
     expect(typeArguments, hasLength(2));
-    expect(typeArguments[0], same(typeProvider.dynamicType));
-    expect(typeArguments[1], same(typeProvider.dynamicType));
+    expect(typeArguments[0], typeProvider.dynamicType);
+    expect(typeArguments[1], typeProvider.dynamicType);
   }
 
   test_mergePropagatedTypes_afterIfThen_different() async {
@@ -2085,33 +2077,33 @@
   }
   return v;
 }''';
+    CompilationUnit unit = await resolveSource(code);
     {
-      SimpleIdentifier identifier = await findMarkedIdentifier(code, "v;");
+      SimpleIdentifier identifier = findMarkedIdentifier(code, unit, "v;");
       expect(identifier.propagatedType, null);
     }
     {
-      SimpleIdentifier identifier = await findMarkedIdentifier(code, "v = '';");
+      SimpleIdentifier identifier =
+          findMarkedIdentifier(code, unit, "v = '';");
       expect(identifier.propagatedType, typeProvider.stringType);
     }
   }
 
   test_mergePropagatedTypes_afterIfThen_same() async {
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 main() {
   var v = 1;
   if (v != null) {
     v = 2;
   }
   return v; // marker
-}''',
-        null,
-        typeProvider.intType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.intType);
   }
 
   test_mergePropagatedTypes_afterIfThenElse_different() async {
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 main() {
   var v = 1;
   if (v != null) {
@@ -2120,14 +2112,13 @@
     v = '3';
   }
   return v; // marker
-}''',
-        null,
-        null);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, null);
   }
 
   test_mergePropagatedTypes_afterIfThenElse_same() async {
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 main() {
   var v = 1;
   if (v != null) {
@@ -2136,15 +2127,14 @@
     v = 3;
   }
   return v; // marker
-}''',
-        null,
-        typeProvider.intType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.intType);
   }
 
   test_mergePropagatedTypesAtJoinPoint_4() async {
     // https://code.google.com/p/dart/issues/detail?id=19929
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f5(x) {
   var y = [];
   if (x) {
@@ -2154,9 +2144,9 @@
   }
   // Propagated type is [int] here: correct.
   return y; // marker
-}''',
-        null,
-        typeProvider.intType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.intType);
   }
 
   test_mutatedOutsideScope() async {
@@ -2204,7 +2194,8 @@
   helper.$name; // marker
 }''';
 
-    SimpleIdentifier id = await findMarkedIdentifier(code, "; // marker");
+    CompilationUnit unit = await resolveSource(code);
+    SimpleIdentifier id = findMarkedIdentifier(code, unit, "; // marker");
     PrefixedIdentifier prefixedId = id.parent;
     expect(id.staticType, typeProvider.dynamicType);
     expect(prefixedId.staticType, typeProvider.dynamicType);
@@ -2218,7 +2209,8 @@
   $name; // marker
 }''';
 
-    SimpleIdentifier getter = await findMarkedIdentifier(code, "; // marker");
+    CompilationUnit unit = await resolveSource(code);
+    SimpleIdentifier getter = findMarkedIdentifier(code, unit, "; // marker");
     expect(getter.staticType, typeProvider.dynamicType);
   }
 
@@ -2229,8 +2221,9 @@
   dynamic obj;
   obj..$name..$name; // marker
 }''';
+    CompilationUnit unit = await resolveSource(code);
     PropertyAccess access =
-        (await findMarkedIdentifier(code, "; // marker")).parent;
+        findMarkedIdentifier(code, unit, "; // marker").parent;
     expect(access.staticType, typeProvider.dynamicType);
     expect(access.realTarget.staticType, typeProvider.dynamicType);
   }
@@ -2248,8 +2241,9 @@
 main() {
   helper.$name(); // marker
 }''';
+    CompilationUnit unit = await resolveSource(code);
     SimpleIdentifier methodName =
-        await findMarkedIdentifier(code, "(); // marker");
+        findMarkedIdentifier(code, unit, "(); // marker");
     MethodInvocation methodInvoke = methodName.parent;
     expect(methodName.staticType, typeProvider.dynamicType);
     expect(methodInvoke.staticType, typeProvider.dynamicType);
@@ -2262,11 +2256,13 @@
   dynamic $name = () => null;
   $name(); // marker
 }''';
-    SimpleIdentifier identifier = await findMarkedIdentifier(code, "$name = ");
+    CompilationUnit unit = await resolveSource(code);
+
+    SimpleIdentifier identifier = findMarkedIdentifier(code, unit, "$name = ");
     expect(identifier.staticType, typeProvider.dynamicType);
 
     SimpleIdentifier methodName =
-        await findMarkedIdentifier(code, "(); // marker");
+        findMarkedIdentifier(code, unit, "(); // marker");
     MethodInvocation methodInvoke = methodName.parent;
     expect(methodName.staticType, typeProvider.dynamicType);
     expect(methodInvoke.staticType, typeProvider.dynamicType);
@@ -2279,8 +2275,9 @@
   dynamic obj;
   obj..$name()..$name(); // marker
 }''';
+    CompilationUnit unit = await resolveSource(code);
     SimpleIdentifier methodName =
-        await findMarkedIdentifier(code, "(); // marker");
+        findMarkedIdentifier(code, unit, "(); // marker");
     MethodInvocation methodInvoke = methodName.parent;
 
     expect(methodInvoke.staticType, typeProvider.dynamicType);
@@ -2294,50 +2291,46 @@
     // static type of [bool] for [==] comparison and the implementation
     // was already consistent with the spec there. But, it's another
     // [Object] method, so it's included here.
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f1(x) {
   var v = (x == x);
   return v; // marker
-}''',
-        null,
-        typeProvider.boolType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.boolType);
   }
 
   test_objectMethodOnDynamicExpression_hashCode() async {
     // https://code.google.com/p/dart/issues/detail?id=20342
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f1(x) {
   var v = x.hashCode;
   return v; // marker
-}''',
-        null,
-        typeProvider.intType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.intType);
   }
 
   test_objectMethodOnDynamicExpression_runtimeType() async {
     // https://code.google.com/p/dart/issues/detail?id=20342
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f1(x) {
   var v = x.runtimeType;
   return v; // marker
-}''',
-        null,
-        typeProvider.typeType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.typeType);
   }
 
   test_objectMethodOnDynamicExpression_toString() async {
     // https://code.google.com/p/dart/issues/detail?id=20342
-    await assertTypeOfMarkedExpression(
-        r'''
+    var code = r'''
 f1(x) {
   var v = x.toString();
   return v; // marker
-}''',
-        null,
-        typeProvider.stringType);
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertTypeOfMarkedExpression(code, unit, null, typeProvider.stringType);
   }
 
   test_propagatedReturnType_localFunction() async {
@@ -2346,8 +2339,9 @@
   f() => 42;
   var v = f();
 }''';
-    await assertPropagatedAssignedType(
-        code, typeProvider.dynamicType, typeProvider.intType);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(
+        code, unit, typeProvider.dynamicType, typeProvider.intType);
   }
 
   test_query() async {
@@ -2431,6 +2425,7 @@
     InterfaceType doubleType = _classElement("double", numType).type;
     InterfaceType functionType = _classElement("Function", objectType).type;
     InterfaceType futureType = _classElement("Future", objectType, ["T"]).type;
+    InterfaceType futureOrType = _classElement("FutureOr", objectType, ["T"]).type;
     InterfaceType intType = _classElement("int", numType).type;
     InterfaceType iterableType =
         _classElement("Iterable", objectType, ["T"]).type;
@@ -2459,7 +2454,7 @@
     ];
     CompilationUnitElementImpl asyncUnit =
         new CompilationUnitElementImpl("async.dart");
-    asyncUnit.types = <ClassElement>[futureType.element, streamType.element];
+    asyncUnit.types = <ClassElement>[futureType.element, futureOrType.element, streamType.element];
     AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
     LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
         context, AstTestFactory.libraryIdentifier2(["dart.core"]));
@@ -2477,6 +2472,7 @@
     expect(provider.dynamicType, isNotNull);
     expect(provider.functionType, same(functionType));
     expect(provider.futureType, same(futureType));
+    expect(provider.futureOrType, same(futureOrType));
     expect(provider.intType, same(intType));
     expect(provider.listType, same(listType));
     expect(provider.mapType, same(mapType));
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index a57434c..68addea 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -30,7 +30,7 @@
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:test/test.dart';
 
-import '../src/dart/analysis/physical_sdk.dart' as physical_sdk;
+import '../src/context/mock_sdk.dart';
 import 'analysis_context_factory.dart';
 import 'test_support.dart';
 
@@ -350,7 +350,10 @@
    */
   TypeProvider get typeProvider {
     if (enableNewAnalysisDriver) {
-      return driver.sourceFactory.dartSdk.context.typeProvider;
+      if (analysisResults.isEmpty) {
+        fail('typeProvider can be called after computing an analysis result.');
+      }
+      return analysisResults.values.first.unit.element.context.typeProvider;
     } else {
       return analysisContext2.typeProvider;
     }
@@ -472,22 +475,22 @@
    * @param code the code that assigns the value to the variable "v", no matter how. We check that
    *          "v" has expected static and propagated type.
    */
-  Future<Null> assertPropagatedAssignedType(String code,
-      DartType expectedStaticType, DartType expectedPropagatedType) async {
-    SimpleIdentifier identifier = await findMarkedIdentifier(code, "v = ");
-    expect(identifier.staticType, same(expectedStaticType));
-    expect(identifier.propagatedType, same(expectedPropagatedType));
+  void assertPropagatedAssignedType(String code, CompilationUnit unit,
+      DartType expectedStaticType, DartType expectedPropagatedType) {
+    SimpleIdentifier identifier = findMarkedIdentifier(code, unit, "v = ");
+    expect(identifier.staticType, expectedStaticType);
+    expect(identifier.propagatedType, expectedPropagatedType);
   }
 
   /**
    * @param code the code that iterates using variable "v". We check that
    *          "v" has expected static and propagated type.
    */
-  Future<Null> assertPropagatedIterationType(String code,
-      DartType expectedStaticType, DartType expectedPropagatedType) async {
-    SimpleIdentifier identifier = await findMarkedIdentifier(code, "v in ");
-    expect(identifier.staticType, same(expectedStaticType));
-    expect(identifier.propagatedType, same(expectedPropagatedType));
+  void assertPropagatedIterationType(String code, CompilationUnit unit,
+      DartType expectedStaticType, DartType expectedPropagatedType) {
+    SimpleIdentifier identifier = findMarkedIdentifier(code, unit, "v in ");
+    expect(identifier.staticType, expectedStaticType);
+    expect(identifier.propagatedType, expectedPropagatedType);
   }
 
   /**
@@ -498,10 +501,10 @@
    * @param expectedPropagatedType if non-null, check actual static type is equal to this.
    * @throws Exception
    */
-  Future<Null> assertTypeOfMarkedExpression(String code,
-      DartType expectedStaticType, DartType expectedPropagatedType) async {
+  void assertTypeOfMarkedExpression(String code, CompilationUnit unit,
+      DartType expectedStaticType, DartType expectedPropagatedType) {
     SimpleIdentifier identifier =
-        await findMarkedIdentifier(code, "; // marker");
+        findMarkedIdentifier(code, unit, "; // marker");
     if (expectedStaticType != null) {
       expect(identifier.staticType, expectedStaticType);
     }
@@ -539,6 +542,14 @@
   }
 
   /**
+   * Compute the analysis result to the given [code] in '/test.dart'.
+   */
+  Future<TestAnalysisResult> computeTestAnalysisResult(String code) async {
+    Source source = addSource(code);
+    return await computeAnalysisResult(source);
+  }
+
+  /**
    * Create a library element that represents a library named `"test"` containing a single
    * empty compilation unit.
    *
@@ -600,32 +611,13 @@
   }
 
   /**
-   * Return the `SimpleIdentifier` marked by `marker`. The source code must have no
-   * errors and be verifiable.
-   *
-   * @param code source code to analyze.
-   * @param marker marker identifying sought after expression in source code.
-   * @return expression marked by the marker.
-   * @throws Exception
+   * Return the [SimpleIdentifier] from [unit] marked by [marker] in [code].
+   * The source code must have no errors and be verifiable.
    */
-  Future<SimpleIdentifier> findMarkedIdentifier(
-      String code, String marker) async {
-    try {
-      Source source = addSource(code);
-      await computeAnalysisResult(source);
-      assertNoErrors(source);
-      verify([source]);
-      CompilationUnit unit = analysisResults[source].unit;
-      return EngineTestCase.findNode(
-          unit, code, marker, (node) => node is SimpleIdentifier);
-    } catch (exception) {
-      // Is there a better exception to throw here? The point is that an
-      // assertion failure here should be a failure, in both "test_*" and
-      // "fail_*" tests. However, an assertion failure is success for the
-      // purpose of "fail_*" tests, so without catching them here "fail_*" tests
-      // can succeed by failing for the wrong reason.
-      throw new StateError("Unexpected assertion failure: $exception");
-    }
+  SimpleIdentifier findMarkedIdentifier(
+      String code, CompilationUnit unit, String marker) {
+    return EngineTestCase.findNode(
+        unit, code, marker, (node) => node is SimpleIdentifier);
   }
 
   Expression findTopLevelConstantExpression(
@@ -663,8 +655,8 @@
     }
     if (enableNewAnalysisDriver) {
       options ??= new AnalysisOptionsImpl();
-      DartSdk sdk =
-          options.strongMode ? physical_sdk.strongSdk : physical_sdk.sdk;
+      DartSdk sdk = new MockSdk(resourceProvider: resourceProvider)
+        ..context.analysisOptions = options;
 
       List<UriResolver> resolvers = <UriResolver>[
         new DartUriResolver(sdk),
@@ -803,6 +795,7 @@
   @override
   void tearDown() {
     analysisContext2 = null;
+    AnalysisEngine.instance.clearCaches();
     super.tearDown();
   }
 
@@ -911,11 +904,13 @@
     return identifier;
   }
 
-  Future<Null> resolveTestUnit(String code) async {
+  Future<Null> resolveTestUnit(String code, {bool noErrors: true}) async {
     testCode = code;
     testSource = addSource(testCode);
     TestAnalysisResult analysisResult = await computeAnalysisResult(testSource);
-    assertNoErrors(testSource);
+    if (noErrors) {
+      assertNoErrors(testSource);
+    }
     verify([testSource]);
     testUnit = analysisResult.unit;
   }
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_driver_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_driver_test.dart
index 8c15b0c..fcb17db 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_driver_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_driver_test.dart
@@ -24,10 +24,4 @@
     extends StrongModeStaticTypeWarningCodeTest {
   @override
   bool get enableNewAnalysisDriver => true;
-
-  @failingTest
-  @override
-  test_genericMethodWrongNumberOfTypeArguments() {
-    return super.test_genericMethodWrongNumberOfTypeArguments();
-  }
 }
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 1825c3c..3165c76 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -2427,10 +2427,10 @@
   f/*<int>*/();
 }
 ''');
-    await computeAnalysisResult(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertErrors(
         source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD]);
-    for (AnalysisError error in analysisContext2.computeErrors(source)) {
+    for (AnalysisError error in analysisResult.errors) {
       if (error.errorCode ==
           StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS) {
         expect(error.message,
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 5eda88cb..adf005d 100644
--- a/pkg/analyzer/test/generated/static_warning_code_driver_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_driver_test.dart
@@ -16,10 +16,4 @@
 class StaticWarningCodeTest_Driver extends StaticWarningCodeTest {
   @override
   bool get enableNewAnalysisDriver => true;
-
-  @failingTest
-  @override
-  test_argumentTypeNotAssignable_ambiguousClassName() {
-    return super.test_argumentTypeNotAssignable_ambiguousClassName();
-  }
 }
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 794ebf5..c196f21 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -374,7 +374,8 @@
     // The name _A is private to the library it's defined in, so this is a type
     // mismatch. Furthermore, the error message should mention both _A and the
     // filenames so the user can figure out what's going on.
-    List<AnalysisError> errors = analysisContext2.computeErrors(source);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    List<AnalysisError> errors = analysisResult.errors;
     expect(errors, hasLength(1));
     AnalysisError error = errors[0];
     expect(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, error.errorCode);
@@ -795,6 +796,16 @@
     verify([source]);
   }
 
+  test_assignmentToFinal_parameter() async {
+    Source source = addSource(r'''
+f(final x) {
+  x = 1;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL]);
+    verify([source]);
+  }
+
   test_assignmentToFinal_postfixMinusMinus() async {
     Source source = addSource(r'''
 f() {
diff --git a/pkg/analyzer/test/generated/strong_mode_driver_test.dart b/pkg/analyzer/test/generated/strong_mode_driver_test.dart
index 77e2736..40d3685 100644
--- a/pkg/analyzer/test/generated/strong_mode_driver_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_driver_test.dart
@@ -8,23 +8,16 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(StrongModeDownwardsInferenceTest_Driver);
+    defineReflectiveTests(StrongModeLocalInferenceTest_Driver);
     defineReflectiveTests(StrongModeStaticTypeAnalyzer2Test_Driver);
     defineReflectiveTests(StrongModeTypePropagationTest_Driver);
   });
 }
 
 @reflectiveTest
-class StrongModeDownwardsInferenceTest_Driver
-    extends StrongModeDownwardsInferenceTest {
+class StrongModeLocalInferenceTest_Driver extends StrongModeLocalInferenceTest {
   @override
   bool get enableNewAnalysisDriver => true;
-
-  @failingTest
-  @override
-  test_inference_hints() {
-    return super.test_inference_hints();
-  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index 8008ac8..d0042cd 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -22,17 +22,17 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(StrongModeDownwardsInferenceTest);
+    defineReflectiveTests(StrongModeLocalInferenceTest);
     defineReflectiveTests(StrongModeStaticTypeAnalyzer2Test);
     defineReflectiveTests(StrongModeTypePropagationTest);
   });
 }
 
 /**
- * Strong mode static analyzer downwards inference tests
+ * Strong mode static analyzer local type inference tests
  */
 @reflectiveTest
-class StrongModeDownwardsInferenceTest extends ResolverTestCase {
+class StrongModeLocalInferenceTest extends ResolverTestCase {
   TypeAssertions _assertions;
 
   Asserter<DartType> _isDynamic;
@@ -40,6 +40,7 @@
   Asserter<InterfaceType> _isFutureOfInt;
   Asserter<DartType> _isInt;
   Asserter<DartType> _isNum;
+  Asserter<DartType> _isObject;
   Asserter<DartType> _isString;
 
   AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, DartType>
@@ -57,27 +58,250 @@
   AsserterBuilder<DartType, DartType> _hasElementOf;
 
   @override
+  Future<TestAnalysisResult> computeAnalysisResult(Source source) async {
+    TestAnalysisResult result = await super.computeAnalysisResult(source);
+    if (_assertions == null) {
+      _assertions = new TypeAssertions(typeProvider);
+      _isType = _assertions.isType;
+      _hasElement = _assertions.hasElement;
+      _isInstantiationOf = _assertions.isInstantiationOf;
+      _isInt = _assertions.isInt;
+      _isNum = _assertions.isNum;
+      _isObject = _assertions.isObject;
+      _isString = _assertions.isString;
+      _isDynamic = _assertions.isDynamic;
+      _isListOf = _assertions.isListOf;
+      _isMapOf = _assertions.isMapOf;
+      _isFunction2Of = _assertions.isFunction2Of;
+      _hasElementOf = _assertions.hasElementOf;
+      _isFutureOf = _isInstantiationOf(_hasElementOf(typeProvider.futureType));
+      _isFutureOfDynamic = _isFutureOf([_isDynamic]);
+      _isFutureOfInt = _isFutureOf([_isInt]);
+      _isStreamOf = _isInstantiationOf(_hasElementOf(typeProvider.streamType));
+    }
+    return result;
+  }
+
+  fail_constrainedByBounds3() async {
+    // Test that upwards inference with two type variables does
+    // not propogate from the constrained variable to the unconstrained
+    // variable if they are ordered right to left, and that if the result
+    // is not a valid instantiation an error is issued
+    String code = r'''
+    T f<T extends S, S extends int>(S x) => null;
+    void test() { var x = f(3); }
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(
+        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "test");
+    VariableDeclarationStatement stmt = statements[0];
+    VariableDeclaration decl = stmt.variables.variables[0];
+    Expression call = decl.initializer;
+    _isDynamic(call.staticType);
+  }
+
+  fail_constrainedByBounds5() async {
+    // Test that upwards inference with two type variables does not
+    // propogate from the constrained variable to the unconstrained
+    // variable if they are ordered right to left, when the variable
+    // appears co and contra variantly, and that an error is issued
+    // for the non-matching bound.
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    T f<T extends Func1<S, S>, S>(S x) => null;
+    void test() { var x = f(3)(4); }
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(
+        source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "test");
+    VariableDeclarationStatement stmt = statements[0];
+    VariableDeclaration decl = stmt.variables.variables[0];
+    Expression call = decl.initializer;
+    _isInt(call.staticType);
+  }
+
+  fail_futureOr_downwards7() async {
+    // Test that downwards inference incorporates bounds correctly
+    // when instantiating type variables.
+    // TODO(leafp): I think this should pass once the inference changes
+    // that jmesserly is adding are landed.
+    String code = r'''
+    import "dart:async";
+    T mk<T extends int>(T x) => null;
+    FutureOr<int> test() => mk(new Future.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  fail_futureOr_downwards8() async {
+    // Test that downwards inference incorporates bounds correctly
+    // when instantiating type variables.
+    // TODO(leafp): I think this should pass once the inference changes
+    // that jmesserly is adding are landed.
+    String code = r'''
+    import "dart:async";
+    T mk<T extends Future<Object>>(T x) => null;
+    FutureOr<int> test() => mk(new Future.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  fail_pinning_multipleConstraints1() async {
+    // Test that downwards inference with two different downwards covariant
+    // constraints on the same parameter correctly fails to infer when
+    // the types do not share a common subtype
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> { B(S s); }
+    A<int, String> test() => new B(3);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    DartType type = body.expression.staticType;
+
+    Element elementB = AstFinder.getClass(unit, "B").element;
+
+    _isInstantiationOf(_hasElement(elementB))([_isDynamic])(type);
+  }
+
+  fail_pinning_multipleConstraints2() async {
+    // Test that downwards inference with two identical downwards covariant
+    // constraints on the same parameter correctly infers and pins the type
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> { B(S s); }
+    A<num, num> test() => new B(3);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    DartType type = body.expression.staticType;
+
+    Element elementB = AstFinder.getClass(unit, "B").element;
+
+    _isInstantiationOf(_hasElement(elementB))([_isNum])(type);
+  }
+
+  fail_pinning_multipleConstraints3() async {
+    // Test that downwards inference with two different downwards covariant
+    // constraints on the same parameter correctly fails to infer when
+    // the types do not share a common subtype, but do share a common supertype
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> { B(S s); }
+    A<int, double> test() => new B(3);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [
+      StrongModeCode.COULD_NOT_INFER,
+      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE
+    ]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    DartType type = body.expression.staticType;
+
+    Element elementB = AstFinder.getClass(unit, "B").element;
+
+    _isInstantiationOf(_hasElement(elementB))([_isDynamic])(type);
+  }
+
+  fail_returnType_variance2() async {
+    // Check that downwards inference correctly pins a type parameter
+    // when the parameter is constrained in a covariant position
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    Func1<String, T> f<T>(T x) => null;
+    Func1<String, num> test() => f(42);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFunction2Of(_isNum, _isFunction2Of(_isString, _isNum))(
+        invoke.staticInvokeType);
+  }
+
+  fail_returnType_variance6() async {
+    // Check that pinning works correctly with a partial type
+    // when the return type uses the variable in a covariant position
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    Func1<String, T> f<T>(T x) => null;
+    T g<T, S>(Func1<S, T> f) => null;
+    num test() => g(f(3));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation call = body.expression;
+    _isNum(call.staticType);
+    _isFunction2Of(_isFunction2Of(_isString, _isNum), _isNum)(
+        call.staticInvokeType);
+  }
+
+  @override
   void setUp() {
     super.setUp();
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.strongMode = true;
     resetWith(options: options);
-    _assertions = new TypeAssertions(typeProvider);
-    _isType = _assertions.isType;
-    _hasElement = _assertions.hasElement;
-    _isInstantiationOf = _assertions.isInstantiationOf;
-    _isInt = _assertions.isInt;
-    _isNum = _assertions.isNum;
-    _isString = _assertions.isString;
-    _isDynamic = _assertions.isDynamic;
-    _isListOf = _assertions.isListOf;
-    _isMapOf = _assertions.isMapOf;
-    _isFunction2Of = _assertions.isFunction2Of;
-    _hasElementOf = _assertions.hasElementOf;
-    _isFutureOf = _isInstantiationOf(_hasElementOf(typeProvider.futureType));
-    _isFutureOfDynamic = _isFutureOf([_isDynamic]);
-    _isFutureOfInt = _isFutureOf([_isInt]);
-    _isStreamOf = _isInstantiationOf(_hasElementOf(typeProvider.streamType));
   }
 
   test_async_method_propagation() async {
@@ -279,6 +503,71 @@
     expect(f0.type.normalParameterTypes[0], typeProvider.intType);
   }
 
+  test_constrainedByBounds1() async {
+    // Test that upwards inference with two type variables correctly
+    // propogates from the constrained variable to the unconstrained
+    // variable if they are ordered left to right.
+    String code = r'''
+    T f<S, T extends S>(S x) => null;
+    void test() { var x = f(3); }
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "test");
+    VariableDeclarationStatement stmt = statements[0];
+    VariableDeclaration decl = stmt.variables.variables[0];
+    Expression call = decl.initializer;
+    _isInt(call.staticType);
+  }
+
+  test_constrainedByBounds2() async {
+    // Test that upwards inference with two type variables does
+    // not propogate from the constrained variable to the unconstrained
+    // variable if they are ordered right to left.
+    String code = r'''
+    T f<T extends S, S>(S x) => null;
+    void test() { var x = f(3); }
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "test");
+    VariableDeclarationStatement stmt = statements[0];
+    VariableDeclaration decl = stmt.variables.variables[0];
+    Expression call = decl.initializer;
+    _isDynamic(call.staticType);
+  }
+
+  test_constrainedByBounds4() async {
+    // Test that upwards inference with two type variables correctly
+    // propogates from the constrained variable to the unconstrained
+    // variable if they are ordered left to right, when the variable
+    // appears co and contra variantly
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    T f<S, T extends Func1<S, S>>(S x) => null;
+    void test() { var x = f(3)(4); }
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "test");
+    VariableDeclarationStatement stmt = statements[0];
+    VariableDeclaration decl = stmt.variables.variables[0];
+    Expression call = decl.initializer;
+    _isInt(call.staticType);
+  }
+
   test_constructorInitializer_propagation() async {
     String code = r'''
       class A {
@@ -678,6 +967,250 @@
     expect(functionReturnValue(4).staticType, typeProvider.stringType);
   }
 
+  test_futureOr_downwards1() async {
+    // Test that downwards inference interacts correctly with FutureOr
+    // parameters.
+    String code = r'''
+    import "dart:async";
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    Future<int> test() => mk(new Future<int>.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_downwards2() async {
+    // Test that downwards inference interacts correctly with FutureOr
+    // parameters when the downwards context is FutureOr
+    String code = r'''
+    import "dart:async";
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    FutureOr<int> test() => mk(new Future<int>.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_downwards3() async {
+    // Test that downwards inference correctly propogates into
+    // arguments.
+    String code = r'''
+    import "dart:async";
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    Future<int> test() => mk(new Future.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_downwards4() async {
+    // Test that downwards inference interacts correctly with FutureOr
+    // parameters when the downwards context is FutureOr
+    String code = r'''
+    import "dart:async";
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    FutureOr<int> test() => mk(new Future.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_downwards5() async {
+    // Test that downwards inference correctly pins the type when it
+    // comes from a FutureOr
+    String code = r'''
+    import "dart:async";
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    FutureOr<num> test() => mk(new Future.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOf([_isNum])(invoke.staticType);
+    _isFutureOf([_isNum])(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_downwards6() async {
+    // Test that downwards inference doesn't decompose FutureOr
+    // when instantiating type variables.
+    String code = r'''
+    import "dart:async";
+    T mk<T>(T x) => null;
+    FutureOr<int> test() => mk(new Future.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_downwards9() async {
+    // Test that downwards inference decomposes correctly with
+    // other composite types
+    String code = r'''
+    import "dart:async";
+    List<T> mk<T>(T x) => null;
+    FutureOr<List<int>> test() => mk(3);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isListOf(_isInt)(invoke.staticType);
+    _isInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_methods1() async {
+    // Test that FutureOr has the Object methods
+    String code = r'''
+    import "dart:async";
+    dynamic test(FutureOr<int> x) => x.toString();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isString(invoke.staticType);
+  }
+
+  test_futureOr_methods2() async {
+    // Test that FutureOr does not have the constituent type methods
+    String code = r'''
+    import "dart:async";
+    dynamic test(FutureOr<int> x) => x.abs();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isDynamic(invoke.staticType);
+  }
+
+  test_futureOr_methods3() async {
+    // Test that FutureOr does not have the Future type methods
+    String code = r'''
+    import "dart:async";
+    dynamic test(FutureOr<int> x) => x.then((x) => x);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isDynamic(invoke.staticType);
+  }
+
+  test_futureOr_methods4() async {
+    // Test that FutureOr<dynamic> does not have all methods
+    String code = r'''
+    import "dart:async";
+    dynamic test(FutureOr<dynamic> x) => x.abs();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isDynamic(invoke.staticType);
+  }
+
+  test_futureOr_upwards1() async {
+    // Test that upwards inference correctly prefers to instantiate type
+    // variables with the "smaller" solution when both are possible.
+    String code = r'''
+    import "dart:async";
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    dynamic test() => mk(new Future<int>.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_upwards2() async {
+    // Test that upwards inference fails when the solution doesn't
+    // match the bound.
+    String code = r'''
+    import "dart:async";
+    Future<T> mk<T extends Future<Object>>(FutureOr<T> x) => null;
+    dynamic test() => mk(new Future<int>.value(42));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFutureOf([_isObject])(invoke.staticType);
+  }
+
   test_inference_hints() async {
     Source source = addSource(r'''
       void main () {
@@ -685,7 +1218,6 @@
         List<int> l0 = [];
      }
    ''');
-    resolve2(source);
     await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
@@ -1204,6 +1736,171 @@
     assertListOfString(methodReturnValue("m1").staticType);
   }
 
+  test_partialTypes1() async {
+    // Test that downwards inference with a partial type
+    // correctly uses the partial information to fill in subterm
+    // types
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    S f<S, T>(Func1<S, T> g) => null;
+    String test() => f((l) => l.length);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    _isString(body.expression.staticType);
+    MethodInvocation invoke = body.expression;
+    FunctionExpression function = invoke.argumentList.arguments[0];
+    ExecutableElement f0 = function.element;
+    FunctionType type = f0.type;
+    _isFunction2Of(_isString, _isInt)(type);
+  }
+
+  test_pinning_multipleConstraints4() async {
+    // Test that downwards inference with two subtype related downwards
+    // covariant constraints on the same parameter correctly infers and pins
+    // the type
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> {}
+    A<int, num> test() => new B();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    DartType type = body.expression.staticType;
+
+    Element elementB = AstFinder.getClass(unit, "B").element;
+
+    _isInstantiationOf(_hasElement(elementB))([_isInt])(type);
+  }
+
+  test_pinning_multipleConstraints_contravariant1() async {
+    // Test that downwards inference with two different downwards contravariant
+    // constraints on the same parameter chooses the upper bound
+    // when the only supertype is Object
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> {}
+    typedef void Contra1<T>(T x);
+    Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
+    Contra1<A<int, String>> test() => mkA();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    FunctionType functionType = body.expression.staticType;
+    DartType type = functionType.normalParameterTypes[0];
+
+    Element elementA = AstFinder.getClass(unit, "A").element;
+
+    _isInstantiationOf(_hasElement(elementA))([_isObject, _isObject])(type);
+  }
+
+  test_pinning_multipleConstraints_contravariant2() async {
+    // Test that downwards inference with two identical downwards contravariant
+    // constraints on the same parameter correctly pins the type
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> {}
+    typedef void Contra1<T>(T x);
+    Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
+    Contra1<A<num, num>> test() => mkA();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    FunctionType functionType = body.expression.staticType;
+    DartType type = functionType.normalParameterTypes[0];
+
+    Element elementA = AstFinder.getClass(unit, "A").element;
+
+    _isInstantiationOf(_hasElement(elementA))([_isNum, _isNum])(type);
+  }
+
+  test_pinning_multipleConstraints_contravariant3() async {
+    // Test that downwards inference with two different downwards contravariant
+    // constraints on the same parameter correctly choose the least upper bound
+    // when they share a common supertype
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> {}
+    typedef void Contra1<T>(T x);
+    Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
+    Contra1<A<int, double>> test() => mkA();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    FunctionType functionType = body.expression.staticType;
+    DartType type = functionType.normalParameterTypes[0];
+
+    Element elementA = AstFinder.getClass(unit, "A").element;
+
+    _isInstantiationOf(_hasElement(elementA))([_isNum, _isNum])(type);
+  }
+
+  test_pinning_multipleConstraints_contravariant4() async {
+    // Test that downwards inference with two different downwards contravariant
+    // constraints on the same parameter correctly choose the least upper bound
+    // when one is a subtype of the other
+    String code = r'''
+    class A<S, T> {
+      S s;
+      T t;
+    }
+    class B<S> extends A<S, S> {}
+    typedef void Contra1<T>(T x);
+    Contra1<A<S, S>> mkA<S>() => (A<S, S> x) {};
+    Contra1<A<int, num>> test() => mkA();
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    FunctionType functionType = body.expression.staticType;
+    DartType type = functionType.normalParameterTypes[0];
+
+    Element elementA = AstFinder.getClass(unit, "A").element;
+
+    _isInstantiationOf(_hasElement(elementA))([_isNum, _isNum])(type);
+  }
+
   test_redirectingConstructor_propagation() async {
     String code = r'''
       class A {
@@ -1220,6 +1917,90 @@
     _isListOf(_isString)(exp.staticType);
   }
 
+  test_returnType_variance1() async {
+    // Check that downwards inference correctly pins a type parameter
+    // when the parameter is constrained in a contravariant position
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    Func1<T, String> f<T>(T x) => null;
+    Func1<num, String> test() => f(42);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation invoke = body.expression;
+    _isFunction2Of(_isNum, _isFunction2Of(_isNum, _isString))(
+        invoke.staticInvokeType);
+  }
+
+  test_returnType_variance3() async {
+    // Check that the variance heuristic chooses the less precise type
+    // when the return type uses the variable in a contravariant position
+    // and there is no downwards constraint.
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    Func1<T, String> f<T>(T x, g(T x)) => null;
+    dynamic test() => f(42, (num x) => x);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    FunctionType functionType = body.expression.staticType;
+    DartType type = functionType.normalParameterTypes[0];
+    _isNum(type);
+  }
+
+  test_returnType_variance4() async {
+    // Check that the variance heuristic chooses the more precise type
+    // when the return type uses the variable in a covariant position
+    // and there is no downwards constraint
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    Func1<String, T> f<T>(T x, g(T x)) => null;
+    dynamic test() => f(42, (num x) => x);
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    FunctionType functionType = body.expression.staticType;
+    DartType type = functionType.returnType;
+    _isInt(type);
+  }
+
+  test_returnType_variance5() async {
+    // Check that pinning works correctly with a partial type
+    // when the return type uses the variable in a contravariant position
+    String code = r'''
+    typedef To Func1<From, To>(From x);
+    Func1<T, String> f<T>(T x) => null;
+    T g<T, S>(Func1<T, S> f) => null;
+    num test() => g(f(3));
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    MethodInvocation call = body.expression;
+    _isNum(call.staticType);
+    _isFunction2Of(_isFunction2Of(_isNum, _isString), _isNum)(
+        call.staticInvokeType);
+  }
+
   test_superConstructorInvocation_propagation() async {
     String code = r'''
       class B {
@@ -1299,6 +2080,24 @@
  */
 @reflectiveTest
 class StrongModeStaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
+  void expectStaticInvokeType(String search, String type) {
+    var invocation = findIdentifier(search).parent as MethodInvocation;
+    expect(invocation.staticInvokeType.toString(), type);
+  }
+
+  fail_futureOr_promotion4() async {
+    // Test that promotion from FutureOr<T> to T works for type
+    // parameters T
+    // TODO(leafp): When the restriction on is checks for generic methods
+    // goes away this should pass.
+    String code = r'''
+    import "dart:async";
+    dynamic test<T extends num>(FutureOr<T> x) => (x is T) &&
+                                                  (x.abs() == 0);
+   ''';
+    await resolveTestUnit(code);
+  }
+
   fail_genericMethod_tearoff_instantiated() async {
     await resolveTestUnit(r'''
 class C<E> {
@@ -1359,6 +2158,37 @@
     expectInitializerType('foo', 'String', isNull);
   }
 
+  test_futureOr_promotion1() async {
+    // Test that promotion from FutureOr<T> to T works for concrete types
+    String code = r'''
+    import "dart:async";
+    dynamic test(FutureOr<int> x) => (x is int) && (x.abs() == 0);
+   ''';
+    await resolveTestUnit(code);
+  }
+
+  test_futureOr_promotion2() async {
+    // Test that promotion from FutureOr<T> to Future<T> works for concrete
+    // types
+    String code = r'''
+    import "dart:async";
+    dynamic test(FutureOr<int> x) => (x is Future<int>) &&
+                                     (x.then((x) => x) == null);
+   ''';
+    await resolveTestUnit(code);
+  }
+
+  test_futureOr_promotion4() async {
+    // Test that promotion from FutureOr<T> to Future<T> works for type
+    // parameters T
+    String code = r'''
+    import "dart:async";
+    dynamic test<T extends num>(FutureOr<T> x) => (x is Future<T>) &&
+                                                  (x.then((x) => x) == null);
+   ''';
+    await resolveTestUnit(code);
+  }
+
   test_genericFunction() async {
     await resolveTestUnit(r'/*=T*/ f/*<T>*/(/*=T*/ x) => null;');
     expectFunctionType('f', '<T>(T) → T',
@@ -1902,6 +2732,7 @@
 }
 ''';
     await resolveTestUnit(code);
+
     expectInitializerType('foo', 'Future<String>', isNull);
   }
 
@@ -1950,7 +2781,7 @@
   var cc = new C();
 }
 ''';
-    await resolveTestUnit(code);
+    await resolveTestUnit(code, noErrors: false);
     expectIdentifierType('ai', "A<dynamic>");
     expectIdentifierType('bi', "B<num>");
     expectIdentifierType('ci', "C<int, B<int>, B<dynamic>>");
@@ -1959,6 +2790,158 @@
     expectIdentifierType('cc', "C<int, B<int>, B<dynamic>>");
   }
 
+  test_instantiateToBounds_class_error_recursion() async {
+    String code = r'''
+class C<T0 extends List<T1>, T1 extends List<T0>> {}
+C c;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
+    expectIdentifierType('c;', 'C<dynamic, dynamic>');
+  }
+
+  test_instantiateToBounds_class_error_recursion_self() async {
+    String code = r'''
+class C<T extends C<T>> {}
+C c;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
+    expectIdentifierType('c;', 'C<dynamic>');
+  }
+
+  test_instantiateToBounds_class_error_recursion_self2() async {
+    String code = r'''
+class A<E> {}
+class C<T extends A<T>> {}
+C c;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
+    expectIdentifierType('c;', 'C<dynamic>');
+  }
+
+  test_instantiateToBounds_class_ok_referenceOther_after() async {
+    String code = r'''
+class C<T0 extends T1, T1 extends int> {}
+C c;
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', 'C<int, int>');
+  }
+
+  test_instantiateToBounds_class_ok_referenceOther_after2() async {
+    String code = r'''
+class C<T0 extends Map<T1, T1>, T1 extends int> {}
+C c;
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', 'C<Map<int, int>, int>');
+  }
+
+  test_instantiateToBounds_class_ok_referenceOther_before() async {
+    String code = r'''
+class C<T0 extends int, T1 extends T0> {}
+C c;
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', 'C<int, int>');
+  }
+
+  test_instantiateToBounds_class_ok_referenceOther_multi() async {
+    String code = r'''
+class C<T0 extends Map<T1, T2>, T1 extends List<T2>, T2 extends int> {}
+C c;
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', 'C<Map<List<int>, int>, List<int>, int>');
+  }
+
+  test_instantiateToBounds_class_ok_simpleBounds() async {
+    String code = r'''
+class A<T> {}
+class B<T extends num> {}
+class C<T extends List<int>> {}
+
+void main() {
+  A a;
+  B b;
+  C c;
+}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectIdentifierType('a;', 'A<dynamic>');
+    expectIdentifierType('b;', 'B<num>');
+    expectIdentifierType('c;', 'C<List<int>>');
+  }
+
+  test_instantiateToBounds_method_ok_referenceOther_before() async {
+    String code = r'''
+class C<T> {
+  void m<S0 extends T, S1 extends List<S0>>(S0 p0, S1 p1) {}
+
+  void main() {
+    m(null, null);
+  }
+}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectStaticInvokeType('m(null', '(T, List<T>) → void');
+  }
+
+  test_instantiateToBounds_method_ok_simpleBounds() async {
+    String code = r'''
+class C<T> {
+  void m<S extends T>(S p0) {}
+
+  void main() {
+    m(null);
+  }
+}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectStaticInvokeType('m(null)', '(T) → void');
+  }
+
+  test_notInstantiatedBound_direct() async {
+    String code = r'''
+class A<T> {}
+class C<T extends A> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_indirect() async {
+    String code = r'''
+class A<T> {}
+class B<T> {}
+class C<T extends A<B>> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_indirect2() async {
+    String code = r'''
+class A<K, V> {}
+class B<T> {}
+class C<T extends A<B, B>> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+      StrongModeCode.NOT_INSTANTIATED_BOUND
+    ]);
+  }
+
   test_objectMethodOnFunctions_Anonymous() async {
     String code = r'''
 void main() {
@@ -2190,8 +3173,9 @@
     v; // marker
   }
 }''';
-    await assertPropagatedIterationType(code, typeProvider.dynamicType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.dynamicType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType, null);
   }
 
   test_foreachInference_reusedVar_disabled() async {
@@ -2203,8 +3187,9 @@
     v; // marker
   }
 }''';
-    await assertPropagatedIterationType(code, typeProvider.dynamicType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.dynamicType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType, null);
   }
 
   test_foreachInference_var() async {
@@ -2215,8 +3200,9 @@
     v; // marker
   }
 }''';
-    await assertPropagatedIterationType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_foreachInference_var_iterable() async {
@@ -2227,8 +3213,9 @@
     v; // marker
   }
 }''';
-    await assertPropagatedIterationType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_foreachInference_var_stream() async {
@@ -2240,8 +3227,9 @@
     v; // marker
   }
 }''';
-    await assertPropagatedIterationType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_bottom_disabled() async {
@@ -2250,8 +3238,9 @@
   var v = null;
   v; // marker
 }''';
-    await assertPropagatedAssignedType(code, typeProvider.dynamicType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.dynamicType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType, null);
   }
 
   test_localVariableInference_constant() async {
@@ -2260,8 +3249,9 @@
   var v = 3;
   v; // marker
 }''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_declaredType_disabled() async {
@@ -2270,8 +3260,9 @@
   dynamic v = 3;
   v; // marker
 }''';
-    await assertPropagatedAssignedType(code, typeProvider.dynamicType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.dynamicType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType, null);
   }
 
   test_localVariableInference_noInitializer_disabled() async {
@@ -2281,8 +3272,9 @@
   v = 3;
   v; // marker
 }''';
-    await assertPropagatedAssignedType(code, typeProvider.dynamicType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.dynamicType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType, null);
   }
 
   test_localVariableInference_transitive_field_inferred_lexical() async {
@@ -2297,8 +3289,9 @@
 main() {
 }
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_field_inferred_reversed() async {
@@ -2313,8 +3306,9 @@
 main() {
 }
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_field_lexical() async {
@@ -2329,8 +3323,9 @@
 main() {
 }
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_field_reversed() async {
@@ -2345,8 +3340,9 @@
 main() {
 }
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_list_local() async {
@@ -2356,8 +3352,9 @@
   var v = x[0];
   v; // marker
 }''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_local() async {
@@ -2367,8 +3364,9 @@
   var v = x;
   v; // marker
 }''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_toplevel_inferred_lexical() async {
@@ -2379,8 +3377,9 @@
   v; // marker
 }
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_toplevel_inferred_reversed() async {
@@ -2391,8 +3390,9 @@
 }
 final x = 3;
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_toplevel_lexical() async {
@@ -2403,8 +3403,9 @@
   v; // marker
 }
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 
   test_localVariableInference_transitive_toplevel_reversed() async {
@@ -2415,7 +3416,8 @@
 }
 int x = 3;
 ''';
-    await assertPropagatedAssignedType(code, typeProvider.intType, null);
-    await assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
   }
 }
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 95358e8..4ad2c63 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -21,6 +21,7 @@
 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 'incremental_resolver_test.dart' as incremental_resolver_test;
@@ -68,6 +69,7 @@
     engine_test.main();
     error_suppression_driver_test.main();
     error_suppression_test.main();
+    gn_test.main();
     hint_code_driver_test.main();
     hint_code_test.main();
     incremental_resolver_test.main();
diff --git a/pkg/analyzer/test/src/context/mock_sdk.dart b/pkg/analyzer/test/src/context/mock_sdk.dart
index 8c796a9..3f0f5dd3 100644
--- a/pkg/analyzer/test/src/context/mock_sdk.dart
+++ b/pkg/analyzer/test/src/context/mock_sdk.dart
@@ -43,11 +43,11 @@
 class Future<T> {
   factory Future(computation()) => null;
   factory Future.delayed(Duration duration, [T computation()]) => null;
-  factory Future.value([T value]) => null;
+  factory Future.value([value]) => null;
 
   static Future<List/*<T>*/> wait/*<T>*/(
       Iterable<Future/*<T>*/> futures) => null;
-  Future/*<R>*/ then/*<R>*/(onValue(T value)) => null;
+  Future/*<R>*/ then/*<R>*/(FutureOr/*<R>*/ onValue(T value)) => null;
 
   Future<T> whenComplete(action());
 }
@@ -66,9 +66,25 @@
     const <String, String>{
       '$sdkRoot/lib/async/stream.dart': r'''
 part of dart.async;
-class Stream<T> {
+abstract class Stream<T> {
   Future<T> get first;
+  StreamSubscription<T> listen(void onData(T event),
+                               { Function onError,
+                                 void onDone(),
+                                 bool cancelOnError});
 }
+
+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> {}
 '''
     });
@@ -103,14 +119,23 @@
 import 'dart:async';
 
 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 Symbol {
+  const factory Symbol(String name) {
+    return null;
+  }
+}
+
 class Type {}
 
 abstract class Comparable<T> {
@@ -126,6 +151,7 @@
   bool get isNotEmpty => false;
   int get length => 0;
   String substring(int len) => null;
+  String toLowerCase();
   String toUpperCase();
   List<int> get codeUnits;
 }
@@ -133,7 +159,13 @@
   external factory RegExp(String source);
 }
 
-class bool 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 <(num other);
   bool operator <=(num other);
@@ -144,21 +176,33 @@
   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 ~();
+  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) });
@@ -194,7 +238,12 @@
 }
 
 class DateTime extends Object {}
-class Null extends Object {}
+
+class Null extends Object {
+  factory Null._uninstantiable() {
+    throw new UnsupportedError('class Null cannot be instantiated');
+  }
+}
 
 class Deprecated extends Object {
   final String expires;
@@ -233,6 +282,7 @@
 
   bool get isEmpty => false;
   E get first => null;
+  E get last => null;
 
   Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e)) => null;
 
@@ -242,9 +292,11 @@
 }
 
 class Map<K, V> extends Object {
-  Iterable<K> get keys => null;
   V operator [](K key) => null;
   void operator []=(K key, V value) {}
+  Iterable<K> get keys => null;
+  int get length;
+  Iterable<V> get values;
 }
 
 external bool identical(Object a, Object b);
@@ -281,8 +333,41 @@
     'dart:html',
     '$sdkRoot/lib/html/dartium/html_dartium.dart',
     '''
-library dart.html;
-class HtmlElement {}
+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 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_MATH = const _MockSdkLibrary(
@@ -295,8 +380,8 @@
 const double PI = 3.1415926535897932;
 const double LN10 =  2.302585092994046;
 
-num/*=T*/ min/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null;
-num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null;
+T min<T extends num>(T a, T b) => null;
+T max<T extends num>(T a, T b) => null;
 
 external double cos(num x);
 external double sin(num x);
@@ -317,6 +402,7 @@
   _LIB_MATH,
   _LIB_HTML_DART2JS,
   _LIB_HTML_DARTIUM,
+  _LIB_INTERCEPTORS,
 ];
 
 class MockSdk implements DartSdk {
@@ -328,6 +414,8 @@
     "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:math": "$sdkRoot/lib/math/math.dart"
   };
 
@@ -397,30 +485,29 @@
 
   @override
   Source fromFileUri(Uri uri) {
-    String filePath = uri.path;
-    String libPath = '$sdkRoot/lib';
-    if (!filePath.startsWith("$libPath/")) {
+    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.replaceAll('\\', '/') == libraryPath) {
+      String libraryPath = provider.convertPath(library.path);
+      if (filePath == libraryPath) {
         try {
-          resource.File file =
-              provider.getResource(provider.convertPath(filePath));
+          resource.File file = provider.getResource(filePath);
           Uri dartUri = Uri.parse(library.shortName);
           return file.createSource(dartUri);
         } catch (exception) {
           return null;
         }
       }
-      if (filePath.startsWith("$libraryPath/")) {
-        String pathInLibrary = filePath.substring(libraryPath.length + 1);
-        String path = '${library.shortName}/$pathInLibrary';
+      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(provider.convertPath(filePath));
-          Uri dartUri = new Uri(scheme: 'dart', path: path);
+          resource.File file = provider.getResource(filePath);
+          Uri dartUri = Uri.parse(uriStr);
           return file.createSource(dartUri);
         } catch (exception) {
           return null;
@@ -448,9 +535,11 @@
 
   @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.
+    for (SdkLibrary library in _LIBRARIES) {
+      if (library.shortName == dartUri) {
+        return library;
+      }
+    }
     return null;
   }
 
@@ -516,7 +605,7 @@
   bool get isImplementation => throw new UnimplementedError();
 
   @override
-  bool get isInternal => throw new UnimplementedError();
+  bool get isInternal => shortName.startsWith('dart:_');
 
   @override
   bool get isShared => throw new UnimplementedError();
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index eb55621..11452bc 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.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:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/file_system/file_system.dart';
@@ -14,10 +12,11 @@
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/status.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
+import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test/test.dart';
 
-import 'physical_sdk.dart';
+import '../../context/mock_sdk.dart';
 
 /**
  * Finds an [Element] with the given [name].
@@ -45,6 +44,7 @@
 
 class BaseAnalysisDriverTest {
   final MemoryResourceProvider provider = new MemoryResourceProvider();
+  DartSdk sdk;
   final ByteStore byteStore = new MemoryByteStore();
   final FileContentOverlay contentOverlay = new FileContentOverlay();
 
@@ -53,7 +53,6 @@
 
   AnalysisDriverScheduler scheduler;
   AnalysisDriver driver;
-  final _Monitor idleStatusMonitor = new _Monitor();
   final List<AnalysisStatus> allStatuses = <AnalysisStatus>[];
   final List<AnalysisResult> allResults = <AnalysisResult>[];
 
@@ -100,6 +99,7 @@
   }
 
   void setUp() {
+    sdk = new MockSdk(resourceProvider: provider);
     testProject = _p('/test/lib');
     testFile = _p('/test/lib/test.dart');
     logger = new PerformanceLog(logBuffer);
@@ -120,12 +120,7 @@
         ], null, provider),
         new AnalysisOptionsImpl()..strongMode = true);
     scheduler.start();
-    driver.status.lastWhere((status) {
-      allStatuses.add(status);
-      if (status.isIdle) {
-        idleStatusMonitor.notify();
-      }
-    });
+    driver.status.listen(allStatuses.add);
     driver.results.listen(allResults.add);
   }
 
@@ -145,18 +140,3 @@
     super.visitElement(element);
   }
 }
-
-class _Monitor {
-  Completer<Null> _completer = new Completer<Null>();
-
-  Future<Null> get signal async {
-    await _completer.future;
-    _completer = new Completer<Null>();
-  }
-
-  void notify() {
-    if (!_completer.isCompleted) {
-      _completer.complete(null);
-    }
-  }
-}
diff --git a/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart b/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
index 9da3f0b..484a99f 100644
--- a/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
@@ -10,9 +10,14 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MemoryCachingByteStoreTest);
+    defineReflectiveTests(NullByteStoreTest);
   });
 }
 
+List<int> _b(int length) {
+  return new List<int>(length);
+}
+
 @reflectiveTest
 class MemoryCachingByteStoreTest {
   test_get_notFound_evict() {
@@ -99,9 +104,17 @@
     expect(cachingStore.get('2'), isNull);
     expect(cachingStore.get('3'), hasLength(30));
   }
+}
 
-  static List<int> _b(int length) {
-    return new List<int>(length);
+@reflectiveTest
+class NullByteStoreTest {
+  test_get() {
+    var store = new NullByteStore();
+
+    expect(store.get('1'), isNull);
+
+    store.put('1', _b(10));
+    expect(store.get('1'), isNull);
   }
 }
 
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 1e6e79c..30fc32e 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -21,6 +21,7 @@
 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
+import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:convert/convert.dart';
@@ -28,8 +29,8 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../../context/mock_sdk.dart';
 import 'base.dart';
-import 'physical_sdk.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -55,6 +56,7 @@
 @reflectiveTest
 class AnalysisDriverSchedulerTest {
   final MemoryResourceProvider provider = new MemoryResourceProvider();
+  DartSdk sdk;
   final ByteStore byteStore = new MemoryByteStore();
   final FileContentOverlay contentOverlay = new FileContentOverlay();
 
@@ -66,6 +68,7 @@
   List<AnalysisResult> allResults = [];
 
   AnalysisDriver newDriver() {
+    sdk = new MockSdk(resourceProvider: provider);
     AnalysisDriver driver = new AnalysisDriver(
         scheduler,
         logger,
@@ -83,6 +86,7 @@
   }
 
   void setUp() {
+    sdk = new MockSdk(resourceProvider: provider);
     logger = new PerformanceLog(logBuffer);
     scheduler = new AnalysisDriverScheduler(logger);
     scheduler.start();
@@ -286,7 +290,7 @@
     }
 
     // Initial analysis, 'b' does not use 'a', so there is a hint.
-    await _waitForIdle();
+    await driver.waitForIdle();
     assertNumberOfErrorsInB(1);
 
     // Update 'b' to use 'a', no more hints.
@@ -299,7 +303,7 @@
 }
 ''');
     driver.changeFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
     assertNumberOfErrorsInB(0);
 
     // Change 'b' content so that it has a hint.
@@ -312,7 +316,7 @@
 ''');
     driver.removeFile(b);
     driver.addFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
     assertNumberOfErrorsInB(1);
   }
 
@@ -327,7 +331,7 @@
     // Now remove 'a'.
     driver.removeFile(a);
 
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     // Only 'b' has been analyzed, because 'a' was removed before we started.
     expect(allResults, hasLength(1));
@@ -436,7 +440,7 @@
     driver.addFile(a);
 
     // We have a result only for "a".
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, hasLength(1));
     {
       AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
@@ -453,7 +457,7 @@
 
     // While "b" is not analyzed explicitly, it is analyzed implicitly.
     // The change causes "a" to be reanalyzed.
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, hasLength(1));
     {
       AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
@@ -469,14 +473,14 @@
 
     driver.addFile(a);
 
-    await _waitForIdle();
+    await driver.waitForIdle();
     allResults.clear();
 
     // Change "b" and notify.
     // Nothing depends on "b", so nothing is analyzed.
     provider.updateFile(b, 'class B2 {}');
     driver.changeFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, isEmpty);
 
     // This should not add "b" to the file state.
@@ -503,7 +507,7 @@
     driver.priorityFiles = [a, b];
     driver.addFile(a);
     driver.addFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     // We have results for both "a" and "b".
     expect(allResults, hasLength(2));
@@ -530,7 +534,7 @@
 
     // We again get results for both "a" and "b".
     // The results are consistent.
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, hasLength(2));
     {
       AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
@@ -548,7 +552,7 @@
 
     // Initial analysis.
     {
-      await _waitForIdle();
+      await driver.waitForIdle();
       expect(allResults, hasLength(1));
       AnalysisResult result = allResults[0];
       expect(result.path, testFile);
@@ -571,7 +575,7 @@
 
     // We get a new result.
     {
-      await _waitForIdle();
+      await driver.waitForIdle();
       expect(allResults, hasLength(1));
       AnalysisResult result = allResults[0];
       expect(result.path, testFile);
@@ -639,7 +643,7 @@
     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, "classs A{} A a;");
+    provider.newFile(d, "class A{} A a;");
     provider.newFile(e, "import 'a.dart'; main() {}");
 
     driver.addFile(a);
@@ -695,7 +699,7 @@
     expect(f.returnType.type.toString(), 'int');
 
     // The same result is also received through the stream.
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, [result]);
   }
 
@@ -714,7 +718,7 @@
 ''');
     driver.addFile(a);
     driver.addFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     AnalysisResult result = await driver.getResult(b);
     expect(result.errors, isEmpty);
@@ -772,7 +776,7 @@
 }
 ''',
         priority: true);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     AnalysisResult result = await driver.getResult(testFile);
     expect(_getClassFieldType(result.unit, 'C', 'f'), 'int');
@@ -789,7 +793,7 @@
 }
 ''',
         priority: true);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     AnalysisResult result = await driver.getResult(testFile);
     expect(_getClassMethodReturnType(result.unit, 'A', 'm'), 'int');
@@ -919,10 +923,11 @@
 
   test_getResult_notDartFile() async {
     var path = _p('/test/lib/test.txt');
-    provider.newFile(path, 'foo bar');
+    provider.newFile(path, 'class A {}');
 
     AnalysisResult result = await driver.getResult(path);
-    expect(result, isNull);
+    expect(result, isNotNull);
+    expect(result.unit.element.types.map((e) => e.name), ['A']);
   }
 
   test_getResult_sameFile_twoUris() async {
@@ -945,7 +950,7 @@
 
     driver.addFile(a);
     driver.addFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     {
       AnalysisResult result = await driver.getResult(b);
@@ -981,7 +986,7 @@
 
     driver.addFile(a);
     driver.addFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     {
       AnalysisResult result = await driver.getResult(a);
@@ -1122,8 +1127,11 @@
   }
 
   test_getUnitElement_notDart() async {
-    CompilationUnitElement unit = await driver.getUnitElement('foo.txt');
-    expect(unit, isNull);
+    var path = _p('/test.txt');
+    provider.newFile(path, 'class A {}');
+    CompilationUnitElement unit = await driver.getUnitElement(path);
+    expect(unit, isNotNull);
+    expect(unit.types.map((e) => e.name), ['A']);
   }
 
   test_hasFilesToAnalyze() async {
@@ -1135,7 +1143,7 @@
     expect(driver.hasFilesToAnalyze, isTrue);
 
     // Wait for idle, nothing to do.
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(driver.hasFilesToAnalyze, isFalse);
 
     // Ask to analyze the file, so there is a file to analyze.
@@ -1149,7 +1157,7 @@
     // Change a file, even if not added, it still might affect analysis.
     driver.changeFile(_p('/not/added.dart'));
     expect(driver.hasFilesToAnalyze, isTrue);
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(driver.hasFilesToAnalyze, isFalse);
 
     // Request of referenced names is not analysis of a file.
@@ -1236,15 +1244,19 @@
 
     driver.addFile(a);
     driver.addFile(c);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
-    expect(driver.knownFiles, unorderedEquals([a, b, c]));
+    expect(driver.knownFiles, contains(a));
+    expect(driver.knownFiles, contains(b));
+    expect(driver.knownFiles, contains(c));
 
     // Remove a.dart and analyze.
     // Both a.dart and b.dart are not known now.
     driver.removeFile(a);
-    await _waitForIdle();
-    expect(driver.knownFiles, unorderedEquals([c]));
+    await driver.waitForIdle();
+    expect(driver.knownFiles, isNot(contains(a)));
+    expect(driver.knownFiles, isNot(contains(b)));
+    expect(driver.knownFiles, contains(c));
   }
 
   test_knownFiles_beforeAnalysis() async {
@@ -1266,6 +1278,15 @@
     expect(driver.knownFiles, isNot(contains(b)));
   }
 
+  test_parseFile_notDart() async {
+    var p = _p('/test/bin/a.txt');
+    provider.newFile(p, 'class A {}');
+
+    ParseResult parseResult = await driver.parseFile(p);
+    expect(parseResult, isNotNull);
+    expect(driver.knownFiles, contains(p));
+  }
+
   test_parseFile_shouldRefresh() async {
     var p = _p('/test/bin/a.dart');
 
@@ -1410,7 +1431,7 @@
     driver.addFile(c);
 
     {
-      await _waitForIdle();
+      await driver.waitForIdle();
 
       // 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.
@@ -1423,7 +1444,7 @@
     {
       provider.updateFile(a, '// does not use c.dart anymore');
       driver.changeFile(a);
-      await _waitForIdle();
+      await driver.waitForIdle();
 
       // Now c.dart does not have a library context, so A and B cannot be
       // resolved, so there are errors.
@@ -1461,7 +1482,7 @@
     driver.addFile(a);
     driver.addFile(b);
 
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     // c.dart was added before a.dart, so we attempt to analyze it before
     // a.dart, but we cannot find the library for it, so we delay analysis
@@ -1485,7 +1506,7 @@
 
     driver.addFile(c);
 
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     // There is no library which c.dart is a part of, so it has unresolved
     // A and B references.
@@ -1523,7 +1544,7 @@
     driver.addFile(a);
     driver.addFile(b);
 
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     // c.dart was added before a.dart, so we attempt to analyze it before
     // a.dart, but we cannot find the library for it, so we delay analysis
@@ -1550,7 +1571,7 @@
     driver.addFile(b);
 
     // We have results for both "a" and "b".
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, hasLength(2));
     {
       AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
@@ -1570,7 +1591,7 @@
     // While "b" is not analyzed explicitly, it is analyzed implicitly.
     // We don't get a result for "b".
     // But the change causes "a" to be reanalyzed.
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, hasLength(1));
     {
       AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
@@ -1582,7 +1603,7 @@
     addTestFile('main() {}');
 
     // We have a result.
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, hasLength(1));
     expect(allResults[0].path, testFile);
     allResults.clear();
@@ -1593,7 +1614,7 @@
     driver.removeFile(testFile);
     driver.changeFile(testFile);
 
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults, isEmpty);
   }
 
@@ -1606,7 +1627,7 @@
 
     driver.addFile(a);
     driver.addFile(b);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     // b.dart s clean.
     expect(allResults.singleWhere((r) => r.path == b).errors, isEmpty);
@@ -1615,7 +1636,7 @@
     // Remove a.dart, now b.dart should be reanalyzed and has an error.
     provider.deleteFile(a);
     driver.removeFile(a);
-    await _waitForIdle();
+    await driver.waitForIdle();
     expect(allResults.singleWhere((r) => r.path == b).errors, hasLength(2));
     allResults.clear();
   }
@@ -1624,7 +1645,7 @@
     String content = 'int f() => 42;';
     addTestFile(content, priority: true);
 
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     expect(allResults, hasLength(1));
     AnalysisResult result = allResults.single;
@@ -1652,7 +1673,7 @@
     driver.addFile(b);
     driver.addFile(c);
     driver.priorityFiles = [b];
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     expect(allResults, hasLength(3));
     AnalysisResult result = allResults[0];
@@ -1664,7 +1685,7 @@
   test_results_regular() async {
     String content = 'int f() => 42;';
     addTestFile(content);
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     expect(allResults, hasLength(1));
     AnalysisResult result = allResults.single;
@@ -1678,7 +1699,7 @@
 
   test_results_status() async {
     addTestFile('int f() => 42;');
-    await _waitForIdle();
+    await driver.waitForIdle();
 
     expect(allStatuses, hasLength(2));
     expect(allStatuses[0].isAnalyzing, isTrue);
@@ -1687,6 +1708,20 @@
     expect(allStatuses[1].isIdle, isTrue);
   }
 
+  test_waitForIdle() async {
+    // With no analysis to do, driver.waitForIdle should complete immediately.
+    await driver.waitForIdle();
+    // Now schedule some analysis.
+    addTestFile('int f() => 42;');
+    expect(allResults, isEmpty);
+    // driver.waitForIdle should wait for the analysis.
+    await driver.waitForIdle();
+    expect(allResults, hasLength(1));
+    // Make sure there is no more analysis pending.
+    await driver.waitForIdle();
+    expect(allResults, hasLength(1));
+  }
+
   void _assertTopLevelDeclarations(
       List<TopLevelDeclarationInSource> declarations,
       List<String> expectedFiles,
@@ -1797,10 +1832,6 @@
    */
   String _p(String path) => provider.convertPath(path);
 
-  Future<Null> _waitForIdle() async {
-    await idleStatusMonitor.signal;
-  }
-
   static String _md5(String content) {
     return hex.encode(md5.convert(UTF8.encode(content)).bytes);
   }
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 99f28e13..79323c1 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -20,6 +20,7 @@
 import 'package:crypto/crypto.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'package:typed_mock/typed_mock.dart';
 
 import '../../context/mock_sdk.dart';
 
@@ -31,21 +32,25 @@
 
 @reflectiveTest
 class FileSystemStateTest {
-  static final MockSdk sdk = new MockSdk();
-
   final MemoryResourceProvider provider = new MemoryResourceProvider();
+  MockSdk sdk;
+
   final ByteStore byteStore = new MemoryByteStore();
   final FileContentOverlay contentOverlay = new FileContentOverlay();
 
   final StringBuffer logBuffer = new StringBuffer();
+  final UriResolver generatedUriResolver = new _GeneratedUriResolverMock();
+  SourceFactory sourceFactory;
   PerformanceLog logger;
 
   FileSystemState fileSystemState;
 
   void setUp() {
     logger = new PerformanceLog(logBuffer);
-    SourceFactory sourceFactory = new SourceFactory([
+    sdk = new MockSdk(resourceProvider: provider);
+    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'))],
@@ -55,7 +60,7 @@
     AnalysisOptions analysisOptions = new AnalysisOptionsImpl()
       ..strongMode = true;
     fileSystemState = new FileSystemState(logger, byteStore, contentOverlay,
-        provider, sourceFactory, analysisOptions, new Uint32List(0), '');
+        provider, sourceFactory, analysisOptions, new Uint32List(0));
   }
 
   test_exportedTopLevelDeclarations_export() {
@@ -260,16 +265,39 @@
     expect(file.uri, FastUri.parse('package:aaa/a.dart'));
     expect(file.content, '');
     expect(file.contentHash, _md5(''));
-    expect(file.importedFiles, isEmpty);
+    expect(_excludeSdk(file.importedFiles), isEmpty);
     expect(file.exportedFiles, isEmpty);
     expect(file.partedFiles, isEmpty);
-    expect(file.directReferencedFiles, isEmpty);
+    expect(_excludeSdk(file.directReferencedFiles), isEmpty);
     expect(file.isPart, isFalse);
     expect(file.library, isNull);
     expect(file.unlinked, isNotNull);
     expect(file.unlinked.classes, isEmpty);
   }
 
+  test_getFileForPath_generatedFile() {
+    Uri uri = Uri.parse('package:aaa/foo.dart');
+    String templatePath = _p('/aaa/lib/foo.dart');
+    String generatedPath = _p('/generated/aaa/lib/foo.dart');
+
+    Source generatedSource = new _SourceMock();
+    when(generatedSource.fullName).thenReturn(generatedPath);
+    when(generatedSource.uri).thenReturn(uri);
+
+    when(generatedUriResolver.resolveAbsolute(uri, uri))
+        .thenReturn(generatedSource);
+
+    FileState generatedFile = fileSystemState.getFileForUri(uri);
+    expect(generatedFile.path, generatedPath);
+    expect(generatedFile.uri, uri);
+
+    FileState templateFile = fileSystemState.getFileForPath(templatePath);
+    expect(templateFile.path, templatePath);
+    expect(templateFile.uri, uri);
+
+    expect(fileSystemState.getFilesForPath(templatePath), [templateFile]);
+  }
+
   test_getFileForPath_library() {
     String a1 = _p('/aaa/lib/a1.dart');
     String a2 = _p('/aaa/lib/a2.dart');
@@ -299,7 +327,7 @@
     expect(file.unlinked.classes, hasLength(1));
     expect(file.unlinked.classes[0].name, 'A1');
 
-    expect(file.importedFiles, hasLength(2));
+    expect(_excludeSdk(file.importedFiles), hasLength(2));
     expect(file.importedFiles[0].path, a2);
     expect(file.importedFiles[0].uri, FastUri.parse('package:aaa/a2.dart'));
     expect(file.importedFiles[0].source, isNotNull);
@@ -319,12 +347,13 @@
     expect(file.partedFiles[0].path, a4);
     expect(file.partedFiles[0].uri, FastUri.parse('package:aaa/a4.dart'));
 
-    expect(file.directReferencedFiles, hasLength(5));
+    expect(_excludeSdk(file.directReferencedFiles), hasLength(5));
 
     expect(fileSystemState.getFilesForPath(a1), [file]);
   }
 
   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');
@@ -342,10 +371,13 @@
 part 'not_dart.txt';
 ''');
     FileState file = fileSystemState.getFileForPath(a);
-    expect(file.importedFiles.map((f) => f.path), [b]);
-    expect(file.exportedFiles.map((f) => f.path), [c]);
-    expect(file.partedFiles.map((f) => f.path), [d]);
-    expect(fileSystemState.knownFilePaths, unorderedEquals([a, b, c, d]));
+    expect(_excludeSdk(file.importedFiles).map((f) => f.path),
+        unorderedEquals([b, not_dart]));
+    expect(
+        file.exportedFiles.map((f) => f.path), unorderedEquals([c, not_dart]));
+    expect(file.partedFiles.map((f) => f.path), unorderedEquals([d, not_dart]));
+    expect(_excludeSdk(fileSystemState.knownFilePaths),
+        unorderedEquals([a, b, c, d, not_dart]));
   }
 
   test_getFileForPath_part() {
@@ -372,10 +404,10 @@
     expect(file_a2.unlinked.classes, hasLength(1));
     expect(file_a2.unlinked.classes[0].name, 'A2');
 
-    expect(file_a2.importedFiles, isEmpty);
+    expect(_excludeSdk(file_a2.importedFiles), isEmpty);
     expect(file_a2.exportedFiles, isEmpty);
     expect(file_a2.partedFiles, isEmpty);
-    expect(file_a2.directReferencedFiles, isEmpty);
+    expect(_excludeSdk(file_a2.directReferencedFiles), isEmpty);
 
     // The library is not known yet.
     expect(file_a2.isPart, isTrue);
@@ -385,7 +417,8 @@
     FileState file_a1 = fileSystemState.getFileForPath(a1);
     expect(file_a1.partedFiles, hasLength(1));
     expect(file_a1.partedFiles[0], same(file_a2));
-    expect(file_a1.directReferencedFiles, unorderedEquals([file_a2]));
+    expect(
+        _excludeSdk(file_a1.directReferencedFiles), unorderedEquals([file_a2]));
 
     // Now the part knows its library.
     expect(file_a2.library, same(file_a1));
@@ -559,7 +592,8 @@
     fb.transitiveFiles;
     fc.transitiveFiles;
     fd.transitiveFiles;
-    expect(fileSystemState.test.filesWithoutTransitiveFiles, isEmpty);
+    expect(
+        _excludeSdk(fileSystemState.test.filesWithoutTransitiveFiles), isEmpty);
 
     // No imports, so just a single file.
     provider.newFile(pa, "");
@@ -642,13 +676,15 @@
     expect(fb.transitiveSignature, isNotNull);
     expect(fc.transitiveSignature, isNotNull);
     expect(fd.transitiveSignature, isNotNull);
-    expect(fileSystemState.test.filesWithoutTransitiveFiles, isEmpty);
+    expect(
+        _excludeSdk(fileSystemState.test.filesWithoutTransitiveFiles), isEmpty);
 
     // 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");
     fa.refresh();
-    expect(fileSystemState.test.filesWithoutTransitiveFiles, isEmpty);
+    expect(
+        _excludeSdk(fileSystemState.test.filesWithoutTransitiveFiles), isEmpty);
 
     // Change a.dart API signature, also flush signatures of b.dart and c.dart,
     // but d.dart is still OK.
@@ -666,16 +702,26 @@
 
   void _assertFilesWithoutTransitiveFiles(List<FileState> expected) {
     var actual = fileSystemState.test.filesWithoutTransitiveFiles;
-    expect(actual, unorderedEquals(expected));
+    expect(_excludeSdk(actual), unorderedEquals(expected));
   }
 
   void _assertFilesWithoutTransitiveSignatures(List<FileState> expected) {
     var actual = fileSystemState.test.filesWithoutTransitiveSignature;
-    expect(actual, unorderedEquals(expected));
+    expect(_excludeSdk(actual), unorderedEquals(expected));
   }
 
   void _assertTransitiveFiles(FileState file, List<FileState> expected) {
-    expect(file.transitiveFiles, unorderedEquals(expected));
+    expect(_excludeSdk(file.transitiveFiles), unorderedEquals(expected));
+  }
+
+  List<T> _excludeSdk<T>(Iterable<T> files) {
+    return files.where((Object file) {
+      if (file is FileState) {
+        return file.uri.scheme != 'dart';
+      } else {
+        return !(file as String).startsWith(_p('/sdk'));
+      }
+    }).toList();
   }
 
   String _p(String path) => provider.convertPath(path);
@@ -684,3 +730,7 @@
     return hex.encode(md5.convert(UTF8.encode(content)).bytes);
   }
 }
+
+class _GeneratedUriResolverMock extends TypedMock implements UriResolver {}
+
+class _SourceMock extends TypedMock implements Source {}
diff --git a/pkg/analyzer/test/src/dart/analysis/physical_sdk.dart b/pkg/analyzer/test/src/dart/analysis/physical_sdk.dart
deleted file mode 100644
index 665c80a..0000000
--- a/pkg/analyzer/test/src/dart/analysis/physical_sdk.dart
+++ /dev/null
@@ -1,17 +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/file_system/physical_file_system.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
-import 'package:analyzer/src/generated/sdk.dart';
-
-final DartSdk sdk = new FolderBasedDartSdk(PhysicalResourceProvider.INSTANCE,
-    FolderBasedDartSdk.defaultSdkDirectory(PhysicalResourceProvider.INSTANCE))
-  ..useSummary = true;
-
-final DartSdk strongSdk = new FolderBasedDartSdk(PhysicalResourceProvider.INSTANCE,
-    FolderBasedDartSdk.defaultSdkDirectory(PhysicalResourceProvider.INSTANCE))
-  ..analysisOptions = (new AnalysisOptionsImpl()..strongMode = true)
-  ..useSummary = true;
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index 6c73bef..93cc816 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -91,6 +91,124 @@
         unorderedEquals([a.methods[0], b.fields[0]]));
   }
 
+  test_classMembers_importNotDart() async {
+    await _resolveTestUnit('''
+import 'not-dart.txt';
+''');
+    RegExp regExp = new RegExp(r'^test$');
+    expect(await driver.search.classMembers(regExp), isEmpty);
+  }
+
+  test_searchMemberReferences_qualified_resolved() async {
+    await _resolveTestUnit('''
+class C {
+  var test;
+}
+main(C c) {
+  print(c.test);
+  c.test = 1;
+  c.test += 2;
+  c.test();
+}
+''');
+    await _verifyNameReferences('test', []);
+  }
+
+  test_searchMemberReferences_qualified_unresolved() async {
+    await _resolveTestUnit('''
+main(p) {
+  print(p.test);
+  p.test = 1;
+  p.test += 2;
+  p.test();
+}
+''');
+    Element main = _findElement('main');
+    await _verifyNameReferences('test', <ExpectedResult>[
+      _expectIdQU(main, SearchResultKind.READ, 'test);'),
+      _expectIdQU(main, SearchResultKind.WRITE, 'test = 1;'),
+      _expectIdQU(main, SearchResultKind.READ_WRITE, 'test += 2;'),
+      _expectIdQU(main, SearchResultKind.INVOCATION, 'test();'),
+    ]);
+  }
+
+  test_searchMemberReferences_unqualified_resolved() async {
+    await _resolveTestUnit('''
+class C {
+  var test;
+  main() {
+    print(test);
+    test = 1;
+    test += 2;
+    test();
+  }
+}
+''');
+    await _verifyNameReferences('test', []);
+  }
+
+  test_searchMemberReferences_unqualified_unresolved() async {
+    await _resolveTestUnit('''
+class C {
+  main() {
+    print(test);
+    test = 1;
+    test += 2;
+    test();
+  }
+}
+''');
+    Element main = _findElement('main');
+    await _verifyNameReferences('test', <ExpectedResult>[
+      _expectIdU(main, SearchResultKind.READ, 'test);'),
+      _expectIdU(main, SearchResultKind.WRITE, 'test = 1;'),
+      _expectIdU(main, SearchResultKind.READ_WRITE, 'test += 2;'),
+      _expectIdU(main, SearchResultKind.INVOCATION, 'test();'),
+    ]);
+  }
+
+  test_searchReferences_ClassElement_definedInSdk_declarationSite() async {
+    await _resolveTestUnit('''
+import 'dart:math';
+Random v1;
+Random v2;
+''');
+
+    // Find the Random class element in the SDK source.
+    // IDEA performs search always at declaration, never at reference.
+    ClassElement randomElement;
+    {
+      String randomPath = sdk.mapDartUri('dart:math').fullName;
+      AnalysisResult result = await driver.getResult(randomPath);
+      randomElement = result.unit.element.getType('Random');
+    }
+
+    Element v1 = _findElement('v1');
+    Element v2 = _findElement('v2');
+    var expected = [
+      _expectId(v1, SearchResultKind.REFERENCE, 'Random v1;'),
+      _expectId(v2, SearchResultKind.REFERENCE, 'Random v2;'),
+    ];
+    await _verifyReferences(randomElement, expected);
+  }
+
+  test_searchReferences_ClassElement_definedInSdk_useSite() async {
+    await _resolveTestUnit('''
+import 'dart:math';
+Random v1;
+Random v2;
+''');
+
+    var v1 = _findElement('v1') as VariableElement;
+    var v2 = _findElement('v2') as VariableElement;
+    var randomElement = v1.type.element as ClassElement;
+    var expected = [
+      _expectId(v1, SearchResultKind.REFERENCE, 'Random v1;'),
+      _expectId(v2, SearchResultKind.REFERENCE, 'Random v2;'),
+    ];
+    await _verifyReferences(randomElement, expected);
+  }
+
   test_searchReferences_ClassElement_definedInside() async {
     await _resolveTestUnit('''
 class A {};
@@ -972,15 +1090,15 @@
 class B = Object with A;
 typedef C();
 D() {}
-var E = null;
+var e = null;
 class NoMatchABCDE {}
 ''');
     Element a = _findElement('A');
     Element b = _findElement('B');
     Element c = _findElement('C');
     Element d = _findElement('D');
-    Element e = _findElement('E');
-    RegExp regExp = new RegExp(r'^[A-E]$');
+    Element e = _findElement('e');
+    RegExp regExp = new RegExp(r'^[ABCDe]$');
     expect(await driver.search.topLevelElements(regExp),
         unorderedEquals([a, b, c, d, e]));
   }
@@ -1005,6 +1123,26 @@
     return _expectId(element, kind, search, isQualified: true, length: length);
   }
 
+  /**
+   * Create [ExpectedResult] for a qualified and unresolved match.
+   */
+  ExpectedResult _expectIdQU(
+      Element element, SearchResultKind kind, String search,
+      {int length}) {
+    return _expectId(element, kind, search,
+        isQualified: true, isResolved: false, length: length);
+  }
+
+  /**
+   * Create [ExpectedResult] for a unqualified and unresolved match.
+   */
+  ExpectedResult _expectIdU(
+      Element element, SearchResultKind kind, String search,
+      {int length}) {
+    return _expectId(element, kind, search,
+        isQualified: false, isResolved: false, length: length);
+  }
+
   Element _findElement(String name, [ElementKind kind]) {
     return findChildElement(testUnit.element, name, kind);
   }
@@ -1027,6 +1165,14 @@
     }
   }
 
+  Future<Null> _verifyNameReferences(
+      String name, List<ExpectedResult> expectedMatches) async {
+    List<SearchResult> results =
+        await driver.search.unresolvedMemberReferences(name);
+    _assertResults(results, expectedMatches);
+    expect(results, hasLength(expectedMatches.length));
+  }
+
   Future _verifyReferences(
       Element element, List<ExpectedResult> expectedMatches) async {
     List<SearchResult> results = await driver.search.references(element);
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index f4016bc..cb3652e 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -9,6 +9,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/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/java_core.dart';
@@ -2005,6 +2006,14 @@
             null, AstTestFactory.typeName4("A"), "a"));
   }
 
+  void test_visitFieldFormalParameter_type_covariant() {
+    FieldFormalParameterImpl expected = AstTestFactory.fieldFormalParameter(
+        null, AstTestFactory.typeName4("A"), "a");
+    expected.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _assertSource("covariant A this.a", expected);
+  }
+
   void test_visitForEachStatement_declared() {
     _assertSource(
         "for (var a in b) {}",
@@ -2487,6 +2496,14 @@
             AstTestFactory.typeName4("T"), "f"));
   }
 
+  void test_visitFunctionTypedFormalParameter_type_covariant() {
+    FunctionTypedFormalParameterImpl expected = AstTestFactory
+        .functionTypedFormalParameter(AstTestFactory.typeName4("T"), "f");
+    expected.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _assertSource("covariant T f()", expected);
+  }
+
   void test_visitFunctionTypedFormalParameter_typeParameters() {
     _assertSource(
         "T f<E>()",
@@ -3129,6 +3146,14 @@
             AstTestFactory.typeName4("A"), "a"));
   }
 
+  void test_visitSimpleFormalParameter_type_covariant() {
+    SimpleFormalParameterImpl expected = AstTestFactory.simpleFormalParameter4(
+        AstTestFactory.typeName4("A"), "a");
+    expected.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _assertSource("covariant A a", expected);
+  }
+
   void test_visitSimpleIdentifier() {
     _assertSource("a", AstTestFactory.identifier3("a"));
   }
@@ -4335,6 +4360,14 @@
             null, AstTestFactory.typeName4("A"), "a"));
   }
 
+  void test_visitFieldFormalParameter_type_covariant() {
+    FieldFormalParameterImpl expected = AstTestFactory.fieldFormalParameter(
+        null, AstTestFactory.typeName4("A"), "a");
+    expected.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _assertSource("covariant A this.a", expected);
+  }
+
   void test_visitForEachStatement_declared() {
     _assertSource(
         "for (var a in b) {}",
@@ -4817,6 +4850,14 @@
             AstTestFactory.typeName4("T"), "f"));
   }
 
+  void test_visitFunctionTypedFormalParameter_type_covariant() {
+    FunctionTypedFormalParameterImpl expected = AstTestFactory
+        .functionTypedFormalParameter(AstTestFactory.typeName4("T"), "f");
+    expected.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _assertSource("covariant T f()", expected);
+  }
+
   void test_visitFunctionTypedFormalParameter_typeParameters() {
     _assertSource(
         "T f<E>()",
@@ -5459,6 +5500,14 @@
             AstTestFactory.typeName4("A"), "a"));
   }
 
+  void test_visitSimpleFormalParameter_type_covariant() {
+    SimpleFormalParameterImpl expected = AstTestFactory.simpleFormalParameter4(
+        AstTestFactory.typeName4("A"), "a");
+    expected.covariantKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+    _assertSource("covariant A a", expected);
+  }
+
   void test_visitSimpleIdentifier() {
     _assertSource("a", AstTestFactory.identifier3("a"));
   }
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index 5d0bb32..2be471d 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -1265,7 +1265,12 @@
     String envVarName = "x";
     String varName = "foo";
     if (valueInEnvironment != null) {
-      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
+      if (enableNewAnalysisDriver) {
+        driver.declaredVariables.define(envVarName, valueInEnvironment);
+      } else {
+        analysisContext2.declaredVariables
+            .define(envVarName, valueInEnvironment);
+      }
     }
     String defaultArg =
         defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
@@ -1279,7 +1284,12 @@
     String envVarName = "x";
     String varName = "foo";
     if (valueInEnvironment != null) {
-      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
+      if (enableNewAnalysisDriver) {
+        driver.declaredVariables.define(envVarName, valueInEnvironment);
+      } else {
+        analysisContext2.declaredVariables
+            .define(envVarName, valueInEnvironment);
+      }
     }
     String defaultArg =
         defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
@@ -1293,7 +1303,12 @@
     String envVarName = "x";
     String varName = "foo";
     if (valueInEnvironment != null) {
-      analysisContext2.declaredVariables.define(envVarName, valueInEnvironment);
+      if (enableNewAnalysisDriver) {
+        driver.declaredVariables.define(envVarName, valueInEnvironment);
+      } else {
+        analysisContext2.declaredVariables
+            .define(envVarName, valueInEnvironment);
+      }
     }
     String defaultArg =
         defaultExpr == null ? "" : ", defaultValue: $defaultExpr";
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 5c691e3..da65a63 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -40,6 +40,7 @@
     defineReflectiveTests(ElementImplTest);
     defineReflectiveTests(LibraryElementImplTest);
     defineReflectiveTests(MethodElementImplTest);
+    defineReflectiveTests(MethodMemberTest);
     defineReflectiveTests(MultiplyDefinedElementImplTest);
     defineReflectiveTests(ParameterElementImplTest);
     defineReflectiveTests(PropertyAccessorElementImplTest);
@@ -1819,8 +1820,8 @@
     // () -> B <: () -> A
     ClassElement a = ElementFactory.classElement2("A");
     ClassElement b = ElementFactory.classElement("B", a.type);
-    FunctionType t = ElementFactory.functionElement2("t", a).type;
-    FunctionType s = ElementFactory.functionElement2("s", b).type;
+    FunctionType t = ElementFactory.functionElement2("t", a.type).type;
+    FunctionType s = ElementFactory.functionElement2("s", b.type).type;
     expect(t.isSubtypeOf(s), isTrue);
     expect(s.isSubtypeOf(t), isTrue);
   }
@@ -1828,10 +1829,10 @@
   void test_isSubtypeOf_returnType_tNotAssignableToS() {
     // ! () -> A <: () -> B
     FunctionType t = ElementFactory
-        .functionElement2("t", ElementFactory.classElement2("A"))
+        .functionElement2("t", ElementFactory.classElement2("A").type)
         .type;
     FunctionType s = ElementFactory
-        .functionElement2("s", ElementFactory.classElement2("B"))
+        .functionElement2("s", ElementFactory.classElement2("B").type)
         .type;
     expect(t.isSubtypeOf(s), isFalse);
   }
@@ -4014,6 +4015,49 @@
 }
 
 @reflectiveTest
+class MethodMemberTest extends EngineTestCase {
+  /**
+   * The type provider used to access the types.
+   */
+  TestTypeProvider _typeProvider;
+
+  @override
+  void setUp() {
+    super.setUp();
+    _typeProvider = new TestTypeProvider();
+  }
+
+  void test_getReifiedType_substituteFor() {
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.analyzeFunctionBodies = false;
+    AnalysisContextHelper contextHelper = new AnalysisContextHelper(options);
+    AnalysisContext context = contextHelper.context;
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
+class A<T> {
+  T f(T x) => x;
+}
+class B<S> extends A<S> {
+  S f(S x) => x;
+}
+''');
+    // prepare CompilationUnitElement
+    LibraryElement libraryElement = context.computeLibraryElement(source);
+    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
+    DartType objectType = _typeProvider.objectType;
+    // B.f
+    ClassElement elementB = unitElement.getType("B");
+    MethodElement BfElement = elementB.type
+        .lookUpInheritedMethod("f", library: libraryElement, thisType: true);
+    MethodElement AfElement = elementB.type
+        .lookUpInheritedMethod("f", library: libraryElement, thisType: false);
+    expect(BfElement.getReifiedType(objectType),
+        equals(AfElement.getReifiedType(objectType)));
+  }
+}
+
+@reflectiveTest
 class MultiplyDefinedElementImplTest extends EngineTestCase {
   void test_fromElements_conflicting() {
     TopLevelVariableElement firstElement =
diff --git a/pkg/analyzer/test/src/summary/bazel_summary_test.dart b/pkg/analyzer/test/src/summary/bazel_summary_test.dart
deleted file mode 100644
index a020a32..0000000
--- a/pkg/analyzer/test/src/summary/bazel_summary_test.dart
+++ /dev/null
@@ -1,608 +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/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/cache.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/generated/source.dart';
-import 'package:analyzer/src/summary/bazel_summary.dart';
-import 'package:analyzer/src/summary/format.dart';
-import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/summary/summarize_ast.dart';
-import 'package:analyzer/src/summary/summarize_elements.dart';
-import 'package:analyzer/src/util/fast_uri.dart';
-import 'package:analyzer/task/dart.dart';
-import 'package:path/path.dart' as pathos;
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../context/abstract_context.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(BazelResultProviderTest);
-    defineReflectiveTests(SummaryProviderTest);
-  });
-}
-
-@reflectiveTest
-class BazelResultProviderTest extends _BaseTest {
-  BazelResultProvider provider;
-
-  @override
-  void setUp() {
-    super.setUp();
-    provider = new BazelResultProvider(new SummaryProvider(
-        resourceProvider,
-        '_.temp',
-        _getOutputFolder,
-        resourceProvider
-            .getFolder(resourceProvider.convertPath('/tmp/dart/bazel/linked')),
-        context));
-  }
-
-  test_failure_inconsistent_directDependency() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    _setComponentFile('aaa', 'a.dart', 'class A2 {}');
-    // The 'aaa' unlinked bundle in inconsistent, so 'bbb' linking fails.
-    Source source = _resolveUri('package:components.bbb/b.dart');
-    CacheEntry entry = context.getCacheEntry(source);
-    expect(provider.compute(entry, LIBRARY_ELEMENT), isFalse);
-  }
-
-  test_failure_missingDirectDependency() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _writeUnlinkedBundle('components.bbb');
-    // We cannot find 'aaa' bundle, so 'bbb' linking fails.
-    Source source = _resolveUri('package:components.bbb/b.dart');
-    CacheEntry entry = context.getCacheEntry(source);
-    expect(provider.compute(entry, LIBRARY_ELEMENT), isFalse);
-  }
-
-  test_success_withoutDependencies() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _writeUnlinkedBundle('components.aaa');
-    // Resynthesize 'aaa' library.
-    Source source = _resolveUri('package:components.aaa/a.dart');
-    LibraryElement library = _resynthesizeLibrary(source);
-    List<ClassElement> types = library.definingCompilationUnit.types;
-    expect(types, hasLength(1));
-    expect(types.single.name, 'A');
-  }
-
-  test_withDependency_import() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    // Prepare sources.
-    Source sourceA = _resolveUri('package:components.aaa/a.dart');
-    Source sourceB = _resolveUri('package:components.bbb/b.dart');
-    // Resynthesize 'bbb' library.
-    LibraryElement libraryB = _resynthesizeLibrary(sourceB);
-    List<ClassElement> types = libraryB.definingCompilationUnit.types;
-    expect(types, hasLength(1));
-    ClassElement typeB = types.single;
-    expect(typeB.name, 'B');
-    expect(typeB.supertype.name, 'A');
-    // The LibraryElement for 'aaa' is not created at all.
-    expect(context.getResult(sourceA, LIBRARY_ELEMENT), isNull);
-    // But we can resynthesize it, and it's the same as from 'bbb'.
-    expect(provider.compute(context.getCacheEntry(sourceA), LIBRARY_ELEMENT),
-        isTrue);
-    LibraryElement libraryA = context.getResult(sourceA, LIBRARY_ELEMENT);
-    expect(libraryA, isNotNull);
-    expect(typeB.supertype.element.library, same(libraryA));
-  }
-
-  LibraryElement _resynthesizeLibrary(Source source) {
-    CacheEntry entry = context.getCacheEntry(source);
-    expect(provider.compute(entry, LIBRARY_ELEMENT), isTrue);
-    return context.getResult(source, LIBRARY_ELEMENT);
-  }
-}
-
-@reflectiveTest
-class SummaryProviderTest extends _BaseTest {
-  SummaryProvider manager;
-
-  @override
-  void setUp() {
-    super.setUp();
-    _createManager();
-  }
-
-  test_getLinkedPackages_cached() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    Source source = _resolveUri('package:components.bbb/b.dart');
-
-    // Session 1.
-    // Create linked bundles and store them in files.
-    {
-      List<Package> packages = manager.getLinkedPackages(source);
-      expect(packages, hasLength(2));
-    }
-
-    // Session 2.
-    // Recreate manager (with disabled linking) and ask again.
-    {
-      _createManager(allowLinking: false);
-      List<Package> packages = manager.getLinkedPackages(source);
-      expect(packages, hasLength(2));
-    }
-  }
-
-  test_getLinkedPackages_cached_declaredVariables_export() {
-    _testImpl_getLinkedPackages_cached_declaredVariables('export');
-  }
-
-  test_getLinkedPackages_cached_declaredVariables_import() {
-    _testImpl_getLinkedPackages_cached_declaredVariables('import');
-  }
-
-  test_getLinkedPackages_null_inconsistent_directDependency() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    _setComponentFile('aaa', 'a.dart', 'class A2 {}');
-    // The 'aaa' unlinked bundle in inconsistent, so 'bbb' linking fails.
-    Source source = _resolveUri('package:components.bbb/b.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, isNull);
-  }
-
-  test_getLinkedPackages_null_missingBundle() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    // We don't write 'aaa', so we cannot get its package.
-    // Ask the package for the URI.
-    Source source = _resolveUri('package:components.aaa/a.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, isNull);
-  }
-
-  test_getLinkedPackages_null_missingDirectDependency() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _writeUnlinkedBundle('components.bbb');
-    // We cannot find 'aaa' bundle, so 'bbb' linking fails.
-    Source source = _resolveUri('package:components.bbb/b.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, isNull);
-  }
-
-  test_getLinkedPackages_null_missingIndirectDependency() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _setComponentFile(
-        'ccc',
-        'c.dart',
-        r'''
-import 'package:components.bbb/b.dart';
-class C extends B {}
-''');
-    _writeUnlinkedBundle('components.bbb');
-    _writeUnlinkedBundle('components.ccc');
-    // We cannot find 'aaa' bundle, so 'ccc' linking fails.
-    Source source = _resolveUri('package:components.ccc/c.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, isNull);
-  }
-
-  test_getLinkedPackages_withDependency_export() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-export 'package:components.aaa/a.dart';
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    Source source = _resolveUri('package:components.bbb/b.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, hasLength(2));
-  }
-
-  test_getLinkedPackages_withDependency_import() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    Source source = _resolveUri('package:components.bbb/b.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, hasLength(2));
-  }
-
-  test_getLinkedPackages_withDependency_import_cycle() {
-    _setComponentFile(
-        'aaa',
-        'a.dart',
-        r'''
-import 'package:components.bbb/b.dart';
-class A {}
-class A2 extends B {}
-''');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-class B2 extends A2 {}
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    Source source = _resolveUri('package:components.bbb/b.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, hasLength(2));
-  }
-
-  test_getLinkedPackages_withDependency_import_indirect() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _setComponentFile(
-        'bbb',
-        'b.dart',
-        r'''
-import 'package:components.aaa/a.dart';
-class B extends A {}
-''');
-    _setComponentFile(
-        'ccc',
-        'c.dart',
-        r'''
-import 'package:components.bbb/b.dart';
-class C extends B {}
-''');
-    _writeUnlinkedBundle('components.aaa');
-    _writeUnlinkedBundle('components.bbb');
-    _writeUnlinkedBundle('components.ccc');
-    Source source = _resolveUri('package:components.ccc/c.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, hasLength(3));
-  }
-
-  test_getLinkedPackages_withoutDependencies() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _writeUnlinkedBundle('components.aaa');
-    // Ask the package for the URI.
-    Source source = _resolveUri('package:components.aaa/a.dart');
-    List<Package> packages = manager.getLinkedPackages(source);
-    expect(packages, hasLength(1));
-  }
-
-  test_getUnlinkedForUri() {
-    _setComponentFile('aaa', 'a1.dart', 'class A1 {}');
-    _setComponentFile('aaa', 'a2.dart', 'class A2 {}');
-    _writeUnlinkedBundle('components.aaa');
-    // Ask the package for the URI.
-    Source source1 = _resolveUri('package:components.aaa/a1.dart');
-    Source source2 = _resolveUri('package:components.aaa/a2.dart');
-    Package package = manager.getUnlinkedForUri(source1.uri);
-    expect(package, isNotNull);
-    // The same instance is returned to another URI in the same package.
-    expect(manager.getUnlinkedForUri(source2.uri), same(package));
-  }
-
-  test_getUnlinkedForUri_inconsistent_fileContent() {
-    File file1 = _setComponentFile('aaa', 'a1.dart', 'class A1 {}');
-    _setComponentFile('aaa', 'a2.dart', 'class A2 {}');
-    _writeUnlinkedBundle('components.aaa');
-    // Update one of the files, so the bundle is not consistent.
-    file1.writeAsStringSync('\nclass A1 {}');
-    Source source1 = _resolveUri('package:components.aaa/a1.dart');
-    Source source2 = _resolveUri('package:components.aaa/a2.dart');
-    expect(manager.getUnlinkedForUri(source1.uri), isNull);
-    expect(manager.getUnlinkedForUri(source2.uri), isNull);
-  }
-
-  test_getUnlinkedForUri_inconsistent_majorVersion() {
-    _setComponentFile('aaa', 'a.dart', 'class A {}');
-    _writeUnlinkedBundle('components.aaa');
-    Source source = _resolveUri('package:components.aaa/a.dart');
-
-    // Create manager with a different major version.
-    // The unlinked bundle cannot be used.
-    _createManager(majorVersion: 12345);
-    Package package = manager.getUnlinkedForUri(source.uri);
-    expect(package, isNull);
-  }
-
-  void _createManager(
-      {bool allowLinking: true,
-      int majorVersion: PackageBundleAssembler.currentMajorVersion}) {
-    manager = new SummaryProvider(resourceProvider, '_.temp', _getOutputFolder,
-        resourceProvider.getFolder('/tmp/dart/bazel/linked'), context,
-        allowLinking: allowLinking, majorVersion: majorVersion);
-  }
-
-  void _testImpl_getLinkedPackages_cached_declaredVariables(
-      String importOrExport) {
-    _setComponentFile(
-        'aaa',
-        'user.dart',
-        '''
-    $importOrExport 'foo.dart'
-      if (dart.library.io) 'foo_io.dart'
-      if (dart.library.html) 'foo_html.dart';
-    ''');
-    _setComponentFile('aaa', 'foo.dart', 'class B {}');
-    _setComponentFile('aaa', 'foo_io.dart', 'class B {}');
-    _setComponentFile('aaa', 'foo_dart.dart', 'class B {}');
-    _writeUnlinkedBundle('components.aaa');
-    Source source = _resolveUri('package:components.aaa/user.dart');
-
-    void _assertDependencyInUser(PackageBundle bundle, String shortName) {
-      for (var i = 0; i < bundle.linkedLibraryUris.length; i++) {
-        if (bundle.linkedLibraryUris[i].endsWith('user.dart')) {
-          LinkedLibrary library = bundle.linkedLibraries[i];
-          expect(library.dependencies.map((d) => d.uri),
-              unorderedEquals(['', 'dart:core', shortName]));
-          return;
-        }
-      }
-      fail('Not found user.dart in $bundle');
-    }
-
-    // Session 1.
-    // Create linked bundles and store them in files.
-    {
-      List<Package> packages = manager.getLinkedPackages(source);
-      expect(packages, hasLength(1));
-      _assertDependencyInUser(packages.single.linked, 'foo.dart');
-    }
-
-    // Session 2.
-    // Recreate manager and don't allow it to perform new linking.
-    // Set a declared variable, which is not used in the package.
-    // We still can get the cached linked bundle.
-    {
-      context.declaredVariables.define('not.used.variable', 'baz');
-      _createManager(allowLinking: false);
-      List<Package> packages = manager.getLinkedPackages(source);
-      expect(packages, hasLength(1));
-      _assertDependencyInUser(packages.single.linked, 'foo.dart');
-    }
-
-    // Session 3.
-    // Recreate manager and don't allow it to perform new linking.
-    // Set the value of a referenced declared variable.
-    // So, we cannot use the previously cached linked bundle.
-    {
-      context.declaredVariables.define('dart.library.io', 'does-not-matter');
-      _createManager(allowLinking: false);
-      List<Package> packages = manager.getLinkedPackages(source);
-      expect(packages, isEmpty);
-    }
-
-    // Session 4.
-    // Enable new linking, and configure to use 'foo_html.dart'.
-    {
-      context.declaredVariables.define('dart.library.html', 'true');
-      _createManager(allowLinking: true);
-      List<Package> packages = manager.getLinkedPackages(source);
-      expect(packages, hasLength(1));
-      _assertDependencyInUser(packages.single.linked, 'foo_html.dart');
-    }
-  }
-}
-
-class _BaseTest extends AbstractContextTest {
-  String sourceRoot;
-  String outRoot;
-
-  @override
-  void setUp() {
-    super.setUp();
-    // Include a 'package' URI resolver.
-    sourceRoot = resourceProvider.convertPath('/company/src/user/project/root');
-    outRoot = resourceProvider.pathContext.join(sourceRoot, 'bazel-bin');
-    sourceFactory = new SourceFactory(<UriResolver>[
-      sdkResolver,
-      resourceResolver,
-      new _TestPackageResolver(resourceProvider, sourceRoot)
-    ], null, resourceProvider);
-    context.sourceFactory = sourceFactory;
-  }
-
-  Folder _getOutputFolder(Uri absoluteUri) {
-    var pathContext = resourceProvider.pathContext;
-    if (absoluteUri.scheme == 'package') {
-      List<String> segments = absoluteUri.pathSegments;
-      if (segments.isNotEmpty) {
-        String packageName = segments.first;
-        String path = pathContext.join(
-            outRoot, packageName.replaceAll('.', pathContext.separator));
-        return resourceProvider.getFolder(path);
-      }
-    }
-    return null;
-  }
-
-  Source _resolveUri(String uri) {
-    return context.sourceFactory.resolveUri(null, uri);
-  }
-
-  File _setComponentFile(String componentName, String fileName, String code) {
-    String path = resourceProvider.pathContext
-        .join(sourceRoot, 'components', componentName, 'lib', fileName);
-    return resourceProvider.newFile(path, code);
-  }
-
-  void _writeUnlinkedBundle(String packageName) {
-    var pathContext = resourceProvider.pathContext;
-    String packagePath = packageName.replaceAll('.', pathContext.separator);
-    PackageBundleBuilder unlinkedBundle = _computeUnlinkedBundle(
-        resourceProvider,
-        packageName,
-        resourceProvider
-            .getFolder(pathContext.join(sourceRoot, packagePath, 'lib')),
-        true);
-    String shortName = packageName.substring(packageName.lastIndexOf('.') + 1);
-    resourceProvider.newFileWithBytes(
-        pathContext.join(outRoot, packagePath, shortName) + '.full.ds',
-        unlinkedBundle.toBuffer());
-  }
-
-  static PackageBundleBuilder _computeUnlinkedBundle(ResourceProvider provider,
-      String packageName, Folder libFolder, bool strong) {
-    var pathContext = provider.pathContext;
-    String libPath = libFolder.path + pathContext.separator;
-    PackageBundleAssembler assembler = new PackageBundleAssembler();
-
-    /**
-     * Return the `package` [Uri] for the given [path] in the `lib` folder
-     * of the current package.
-     */
-    Uri getUri(String path) {
-      String pathInLib = path.substring(libPath.length);
-      String uriPath = pathos.posix.joinAll(pathContext.split(pathInLib));
-      String uriStr = 'package:$packageName/$uriPath';
-      return FastUri.parse(uriStr);
-    }
-
-    /**
-     * If the given [file] is a Dart file, add its unlinked unit.
-     */
-    void addDartFile(File file) {
-      String path = file.path;
-      if (AnalysisEngine.isDartFileName(path)) {
-        Uri uri = getUri(path);
-        Source source = file.createSource(uri);
-        CompilationUnit unit = _parse(source, strong);
-        UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
-        assembler.addUnlinkedUnit(source, unlinkedUnit);
-      }
-    }
-
-    /**
-     * Visit the [folder] recursively.
-     */
-    void addDartFiles(Folder folder) {
-      List<Resource> children = folder.getChildren();
-      for (Resource child in children) {
-        if (child is File) {
-          addDartFile(child);
-        }
-      }
-      for (Resource child in children) {
-        if (child is Folder) {
-          addDartFiles(child);
-        }
-      }
-    }
-
-    addDartFiles(libFolder);
-    return assembler.assemble();
-  }
-
-  /**
-   * Parse the given [source] into AST.
-   */
-  static CompilationUnit _parse(Source source, bool strong) {
-    String code = source.contents.data;
-    AnalysisErrorListener errorListener = AnalysisErrorListener.NULL_LISTENER;
-    CharSequenceReader reader = new CharSequenceReader(code);
-    Scanner scanner = new Scanner(source, reader, errorListener);
-    scanner.scanGenericMethodComments = strong;
-    Token token = scanner.tokenize();
-    LineInfo lineInfo = new LineInfo(scanner.lineStarts);
-    Parser parser = new Parser(source, errorListener);
-    parser.parseGenericMethodComments = strong;
-    CompilationUnit unit = parser.parseCompilationUnit(token);
-    unit.lineInfo = lineInfo;
-    return unit;
-  }
-}
-
-class _TestPackageResolver implements UriResolver {
-  final ResourceProvider resourceProvider;
-  final String sourceRoot;
-
-  _TestPackageResolver(this.resourceProvider, this.sourceRoot);
-
-  @override
-  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
-    if (uri.scheme == 'package') {
-      List<String> segments = uri.pathSegments;
-      if (segments.isNotEmpty) {
-        pathos.Context pathContext = resourceProvider.pathContext;
-        String packageName = segments.first;
-        String folderPath = pathContext.join(
-            sourceRoot, packageName.replaceAll('.', pathContext.separator));
-        String path = pathContext.join(
-            folderPath, 'lib', pathContext.joinAll(segments.skip(1)));
-        return resourceProvider.getFile(path).createSource(uri);
-      }
-    }
-    return null;
-  }
-
-  @override
-  Uri restoreAbsolute(Source source) {
-    throw new UnimplementedError();
-  }
-}
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
index aa9cde3..be79415 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -107,12 +107,6 @@
 
   @override
   @failingTest
-  void test_blockBodiedLambdas_doesNotInferBottom_async_topLevel() {
-    super.test_blockBodiedLambdas_doesNotInferBottom_async_topLevel();
-  }
-
-  @override
-  @failingTest
   void test_blockBodiedLambdas_doesNotInferBottom_asyncStar_topLevel() {
     super.test_blockBodiedLambdas_doesNotInferBottom_asyncStar_topLevel();
   }
@@ -701,6 +695,7 @@
         .test_unsafeBlockClosureInference_methodCall_implicitTypeParam_comment();
   }
 
+  @override
   LibraryElementImpl _checkSource(
       SummaryResynthesizer resynthesizer, Source source) {
     LibraryElementImpl resynthesized =
@@ -726,9 +721,8 @@
 
   @override
   @failingTest
-  test_instantiateToBounds_boundRefersToLaterTypeArgument() {
-    // TODO(paulberry): this is failing due to dartbug.com/27072.
-    super.test_instantiateToBounds_boundRefersToLaterTypeArgument();
+  test_instantiateToBounds_boundRefersToItself() {
+    super.test_instantiateToBounds_boundRefersToItself();
   }
 
   @override
@@ -820,7 +814,6 @@
         context.analysisOptions.strongMode);
 
     return new TestSummaryResynthesizer(
-        null,
         context,
         new Map<String, UnlinkedUnit>()
           ..addAll(SerializedMockSdk.instance.uriToUnlinkedUnit)
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index e1448b4..3d8874c 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -146,7 +146,7 @@
       TestSummaryResynthesizer resynthesizer, LibraryElement library) {
     // Check that no other summaries needed to be resynthesized to resynthesize
     // the library element.
-    expect(resynthesizer.resynthesisCount, 1);
+    expect(resynthesizer.resynthesisCount, 3);
     // Check that the only linked summary consulted was that for [uri].
     expect(resynthesizer.linkedSummariesRequested, hasLength(1));
     expect(resynthesizer.linkedSummariesRequested.first,
@@ -532,18 +532,17 @@
         Identifier rName = r.name;
         Identifier oName = o.name;
         if (oName is PrefixedIdentifier &&
+            rName is PrefixedIdentifier &&
             o.constructorName != null &&
-            o.element != null) {
-          // E.g. `@prefix.cls.ctor`.  This gets resynthesized as `@cls.ctor`,
-          // with `cls.ctor` represented as a PrefixedIdentifier.
-          expect(rName, new isInstanceOf<PrefixedIdentifier>(), reason: desc);
-          if (rName is PrefixedIdentifier) {
-            compareConstAsts(rName.prefix, oName.identifier, desc);
-            expect(rName.period.lexeme, '.', reason: desc);
-            compareConstAsts(rName.identifier, o.constructorName, desc);
-            expect(r.period, isNull, reason: desc);
-            expect(r.constructorName, isNull, reason: desc);
-          }
+            o.element != null &&
+            r.constructorName == null) {
+          // E.g. `@prefix.cls.ctor`.  This sometimes gets resynthesized as
+          // `@cls.ctor`, with `cls.ctor` represented as a PrefixedIdentifier.
+          compareConstAsts(rName.prefix, oName.identifier, desc);
+          expect(rName.period.lexeme, '.', reason: desc);
+          compareConstAsts(rName.identifier, o.constructorName, desc);
+          expect(r.period, isNull, reason: desc);
+          expect(r.constructorName, isNull, reason: desc);
         } else {
           compareConstAsts(r.name, o.name, desc);
           expect(r.period?.lexeme, o.period?.lexeme, reason: desc);
@@ -926,10 +925,14 @@
     }
     expect(resynthesized.defaultValueCode, original.defaultValueCode,
         reason: desc);
-    expect(resynthesized.isCovariant, original.isCovariant, reason: desc);
+    expect(resynthesized.isCovariant, original.isCovariant,
+        reason: '$desc isCovariant');
     ParameterElementImpl resynthesizedActual =
         getActualElement(resynthesized, desc);
     ParameterElementImpl originalActual = getActualElement(original, desc);
+    expect(resynthesizedActual.isExplicitlyCovariant,
+        originalActual.isExplicitlyCovariant,
+        reason: desc);
     compareFunctionElements(
         resynthesizedActual.initializer, originalActual.initializer, desc);
   }
@@ -1205,6 +1208,11 @@
         return element.isConst;
       }
       return false;
+    } else if (modifier == Modifier.COVARIANT) {
+      if (element is ParameterElementImpl) {
+        return element.isExplicitlyCovariant;
+      }
+      return false;
     } else if (modifier == Modifier.DEFERRED) {
       if (element is ImportElement) {
         return element.isDeferred;
@@ -2822,35 +2830,6 @@
 ''');
   }
 
-  void test_covariant_parameter() {
-    // 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.
-    checkLibrary(r'''
-library meta;
-const checked = null;
-class A<T> {
-  void f(@checked T t) {}
-}
-''');
-  }
-
-  void test_covariant_parameter_inherited() {
-    // 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.
-    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) {}
-}
-''');
-  }
-
   test_defaultValue_refersToGenericClass_constructor() {
     checkLibrary('''
 class B<T> {
@@ -3103,6 +3082,13 @@
     checkLibrary('export "a.dart"; export "b.dart";');
   }
 
+  test_field_covariant() {
+    checkLibrary('''
+class C {
+  covariant int x;
+}''');
+  }
+
   test_field_documented() {
     checkLibrary('''
 class C {
@@ -3229,6 +3215,10 @@
     checkLibrary('external f();');
   }
 
+  test_function_parameter_final() {
+    checkLibrary('f(final x) {}');
+  }
+
   test_function_parameter_kind_named() {
     checkLibrary('f({x}) {}');
   }
@@ -3287,6 +3277,52 @@
     checkLibrary('f() {} g() {}');
   }
 
+  test_futureOr() {
+    var library = checkLibrary('import "dart:async"; FutureOr<int> x;');
+    var variables = library.definingCompilationUnit.topLevelVariables;
+    expect(variables, hasLength(1));
+    if (createOptions().strongMode) {
+      expect(variables[0].type.toString(), 'FutureOr<int>');
+    } else {
+      expect(variables[0].type.toString(), 'dynamic');
+    }
+  }
+
+  test_futureOr_const() {
+    var library = checkLibrary('import "dart:async"; const x = FutureOr;');
+    var variables = library.definingCompilationUnit.topLevelVariables;
+    expect(variables, hasLength(1));
+    var x = variables[0] as ConstTopLevelVariableElementImpl;
+    if (createOptions().strongMode) {
+      expect(x.type.toString(), 'Type');
+    } else {
+      expect(x.type.toString(), 'dynamic');
+    }
+    expect(x.constantInitializer.toString(), 'FutureOr');
+  }
+
+  test_futureOr_inferred() {
+    var library = checkLibrary('''
+import "dart:async";
+FutureOr<int> f() => null;
+var x = f();
+var y = x.then((z) => z.asDouble());
+''');
+    var variables = library.definingCompilationUnit.topLevelVariables;
+    expect(variables, hasLength(2));
+    var x = variables[0];
+    expect(x.name, 'x');
+    var y = variables[1];
+    expect(y.name, 'y');
+    if (createOptions().strongMode) {
+      expect(x.type.toString(), 'FutureOr<int>');
+      expect(y.type.toString(), 'dynamic');
+    } else {
+      expect(x.type.toString(), 'dynamic');
+      expect(y.type.toString(), 'dynamic');
+    }
+  }
+
   test_generic_gClass_gMethodStatic() {
     prepareAnalysisContext(createOptions());
     checkLibrary('''
@@ -3780,6 +3816,36 @@
 ''');
   }
 
+  test_invalid_annotation_prefixed_constructor() {
+    addLibrarySource(
+        '/a.dart',
+        r'''
+class C {
+  const C.named();
+}
+''');
+    checkLibrary('''
+import "a.dart" as a;
+@a.C.named
+class D {}
+''');
+  }
+
+  test_invalid_annotation_unprefixed_constructor() {
+    addLibrarySource(
+        '/a.dart',
+        r'''
+class C {
+  const C.named();
+}
+''');
+    checkLibrary('''
+import "a.dart";
+@C.named
+class D {}
+''');
+  }
+
   test_library() {
     checkLibrary('');
   }
@@ -4174,22 +4240,6 @@
         'class C extends D { f() => null; } abstract class D { int f(); }');
   }
 
-  test_method_parameter_parameters() {
-    checkLibrary('class C { f(g(x, y)) {} }');
-  }
-
-  test_method_parameter_parameters_in_generic_class() {
-    checkLibrary('class C<A, B> { f(A g(B x)) {} }');
-  }
-
-  test_method_parameter_return_type() {
-    checkLibrary('class C { f(int g()) {} }');
-  }
-
-  test_method_parameter_return_type_void() {
-    checkLibrary('class C { f(void g()) {} }');
-  }
-
   test_method_type_parameter() {
     prepareAnalysisContext(createOptions());
     checkLibrary('class C { T f<T, U>(U u) => null; }');
@@ -4289,6 +4339,67 @@
     checkLibrary('class C { bool operator<=(C other) => false; }');
   }
 
+  void test_parameter_checked() {
+    // 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.
+    checkLibrary(r'''
+library meta;
+const checked = null;
+class A<T> {
+  void f(@checked T t) {}
+}
+''');
+  }
+
+  void test_parameter_checked_inherited() {
+    // 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.
+    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) {}
+}
+''');
+  }
+
+  test_parameter_covariant() {
+    prepareAnalysisContext(createOptions());
+    checkLibrary('class C { void m(covariant C c) {} }');
+  }
+
+  void test_parameter_covariant_inherited() {
+    checkLibrary(r'''
+class A<T> {
+  void f(covariant T t) {}
+}
+class B<T> extends A<T> {
+  void f(T t) {}
+}
+''');
+  }
+
+  test_parameter_parameters() {
+    checkLibrary('class C { f(g(x, y)) {} }');
+  }
+
+  test_parameter_parameters_in_generic_class() {
+    checkLibrary('class C<A, B> { f(A g(B x)) {} }');
+  }
+
+  test_parameter_return_type() {
+    checkLibrary('class C { f(int g()) {} }');
+  }
+
+  test_parameter_return_type_void() {
+    checkLibrary('class C { f(void g()) {} }');
+  }
+
   test_parameterTypeNotInferred_constructor() {
     // Strong mode doesn't do type inference on constructor parameters, so it's
     // ok that we don't store inferred type info for them in summaries.
@@ -4363,6 +4474,10 @@
 ''');
   }
 
+  test_setter_covariant() {
+    checkLibrary('class C { void set x(covariant int value); }');
+  }
+
   test_setter_documented() {
     checkLibrary('''
 // Extra comment so doc comment offset != 0
@@ -4852,7 +4967,7 @@
     checkMinimalResynthesisWork(resynthesizer, original.library);
     // Check that no other summaries needed to be resynthesized to resynthesize
     // the library element.
-    expect(resynthesizer.resynthesisCount, 1);
+    expect(resynthesizer.resynthesisCount, 3);
     expect(result.location, location);
     return result;
   }
@@ -4875,10 +4990,14 @@
    */
   final Set<String> linkedSummariesRequested = new Set<String>();
 
-  TestSummaryResynthesizer(SummaryResynthesizer parent, AnalysisContext context,
-      this.unlinkedSummaries, this.linkedSummaries, this.allowMissingFiles)
-      : super(parent, context, context.typeProvider, context.sourceFactory,
-            context.analysisOptions.strongMode);
+  TestSummaryResynthesizer(AnalysisContext context, this.unlinkedSummaries,
+      this.linkedSummaries, this.allowMissingFiles)
+      : super(context, context.sourceFactory,
+            context.analysisOptions.strongMode) {
+    // Clear after resynthesizing TypeProvider in super().
+    unlinkedSummariesRequested.clear();
+    linkedSummariesRequested.clear();
+  }
 
   @override
   LinkedLibrary getLinkedSummary(String uri) {
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 3c363df..9e12705 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -6021,6 +6021,16 @@
     }
   }
 
+  test_executable_param_isFinal() {
+    String text = 'f(x, final y) {}';
+    UnlinkedExecutable executable = serializeExecutableText(text);
+    expect(executable.parameters, hasLength(2));
+    expect(executable.parameters[0].name, 'x');
+    expect(executable.parameters[0].isFinal, isFalse);
+    expect(executable.parameters[1].name, 'y');
+    expect(executable.parameters[1].isFinal, isTrue);
+  }
+
   test_executable_param_no_flags() {
     UnlinkedExecutable executable = serializeExecutableText('f(x) {}');
     expect(executable.parameters[0].isFunctionTyped, isFalse);
@@ -8880,6 +8890,11 @@
     checkTypeRef(findVariable('d').type, absUri('/a.dart'), 'a.dart', 'D');
   }
 
+  test_localNameShadowsImportPrefix() {
+    serializeLibraryText('import "dart:async" as a; class a {}; a x;');
+    checkTypeRef(findVariable('x').type, null, null, 'a');
+  }
+
   test_metadata_classDeclaration() {
     checkAnnotationA(
         serializeClassText('const a = null; @a class C {}').annotations);
diff --git a/pkg/analyzer/test/src/summary/test_all.dart b/pkg/analyzer/test/src/summary/test_all.dart
index dd63f2f..bce3840 100644
--- a/pkg/analyzer/test/src/summary/test_all.dart
+++ b/pkg/analyzer/test/src/summary/test_all.dart
@@ -7,7 +7,6 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'api_signature_test.dart' as api_signature_test;
-import 'bazel_summary_test.dart' as bazel_summary_test;
 import 'flat_buffers_test.dart' as flat_buffers_test;
 import 'in_summary_source_test.dart' as in_summary_source_test;
 import 'linker_test.dart' as linker_test;
@@ -23,7 +22,6 @@
 main() {
   defineReflectiveSuite(() {
     api_signature_test.main();
-    bazel_summary_test.main();
     flat_buffers_test.main();
     in_summary_source_test.main();
     linker_test.main();
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index e8f9b0e..69ae478 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -40,21 +40,26 @@
   void test_awaitForInCastsStreamElementToVariable() {
     checkFile('''
 import 'dart:async';
+
+abstract class MyStream<T> extends Stream<T> {
+  factory MyStream() => null;
+}
+
 main() async {
   // Don't choke if sequence is not stream.
   await for (var i in /*error:FOR_IN_OF_INVALID_TYPE*/1234) {}
 
   // Dynamic cast.
-  await for (String /*info:DYNAMIC_CAST*/s in new Stream<dynamic>()) {}
+  await for (String /*info:DYNAMIC_CAST*/s in new MyStream<dynamic>()) {}
 
   // Identity cast.
-  await for (String s in new Stream<String>()) {}
+  await for (String s in new MyStream<String>()) {}
 
   // Untyped.
-  await for (var s in new Stream<String>()) {}
+  await for (var s in new MyStream<String>()) {}
 
   // Downcast.
-  await for (int /*info:DOWN_CAST_IMPLICIT*/i in new Stream<num>()) {}
+  await for (int /*info:DOWN_CAST_IMPLICIT*/i in new MyStream<num>()) {}
 }
 ''');
   }
@@ -937,16 +942,16 @@
 foo1() async => x;
 Future foo2() async => x;
 Future<int> foo3() async => x;
-Future<int> foo4() async => new Future<int>.value(/*info:DYNAMIC_CAST*/x);
+Future<int> foo4() async => new Future<int>.value(x);
 Future<int> foo5() async =>
-    /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(/*info:DYNAMIC_CAST*/x);
+    /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x);
 
 bar1() async { return x; }
 Future bar2() async { return x; }
 Future<int> bar3() async { return x; }
-Future<int> bar4() async { return new Future<int>.value(/*info:DYNAMIC_CAST*/x); }
+Future<int> bar4() async { return new Future<int>.value(x); }
 Future<int> bar5() async {
-  return /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(/*info:DYNAMIC_CAST*/x);
+  return /*error:RETURN_OF_INVALID_TYPE*/new Future<String>.value(x);
 }
 
 int y;
@@ -981,16 +986,22 @@
 
 dynamic x;
 
+Stream<int> intStream;
+
+abstract class MyStream<T> extends Stream<T> {
+  factory MyStream() => null;
+}
+
 bar1() async* { yield x; }
 Stream bar2() async* { yield x; }
 Stream<int> bar3() async* { yield /*info:DYNAMIC_CAST*/x; }
-Stream<int> bar4() async* { yield /*error:YIELD_OF_INVALID_TYPE*/new Stream<int>(); }
+Stream<int> bar4() async* { yield /*error:YIELD_OF_INVALID_TYPE*/intStream; }
 
 baz1() async* { yield* /*info:DYNAMIC_CAST*/x; }
 Stream baz2() async* { yield* /*info:DYNAMIC_CAST*/x; }
 Stream<int> baz3() async* { yield* /*info:DYNAMIC_CAST*/x; }
-Stream<int> baz4() async* { yield* new Stream<int>(); }
-Stream<int> baz5() async* { yield* /*info:INFERRED_TYPE_ALLOCATION*/new Stream(); }
+Stream<int> baz4() async* { yield* intStream; }
+Stream<int> baz5() async* { yield* /*info:INFERRED_TYPE_ALLOCATION*/new MyStream(); }
 ''');
   }
 
@@ -2094,6 +2105,41 @@
 ''');
   }
 
+  void test_genericMethodSuper() {
+    checkFile(r'''
+class A<T> {
+  A<S> create<S extends T>() => new A<S>();
+}
+class B extends A {
+  A<S> create<S>() => super.create<S>();
+}
+class C extends A {
+  A<S> create<S>() => super.create();
+}
+class D extends A<num> {
+  A<S> create<S extends num>() => super.create<S>();
+}
+class E extends A<num> {
+  A<S> create<S extends num>() => /*error:RETURN_OF_INVALID_TYPE*/super.create<int>();
+}
+class F extends A<num> {
+  create2<S>() => super.create</*error:TYPE_ARGUMENT_NOT_MATCHING_BOUNDS*/S>();
+}
+    ''');
+  }
+
+  void test_genericMethodSuperSubstitute() {
+    checkFile(r'''
+class Clonable<T> {}
+class G<T> {
+  create<A extends Clonable<T>, B extends Iterable<A>>() => null;
+}
+class H extends G<num> {
+  create2() => super.create<Clonable<int>, List<Clonable<int>>>();
+}
+    ''');
+  }
+
   void test_getterGetterOverride() {
     checkFile('''
 class A {}
@@ -2381,7 +2427,7 @@
   void test_implicitDynamic_type() {
     addFile(r'''
 class C<T> {}
-class M1<T extends /*error:IMPLICIT_DYNAMIC_TYPE*/List> {}
+class M1<T extends /*error:IMPLICIT_DYNAMIC_TYPE*//*error:NOT_INSTANTIATED_BOUND*/List> {}
 class M2<T> {}
 class I<T> {}
 class D<T, S> extends /*error:IMPLICIT_DYNAMIC_TYPE*/C
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 ddf18db..5d5874a 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -36,6 +36,31 @@
    */
   CompilationUnitElement checkFile(String content);
 
+  void test_asyncClosureReturnType_flatten() {
+    var mainUnit = checkFile('''
+import 'dart:async';
+Future<int> futureInt = null;
+var f = () => futureInt;
+var g = () async => futureInt;
+''');
+    var futureInt = mainUnit.topLevelVariables[0];
+    expect(futureInt.name, 'futureInt');
+    expect(futureInt.type.toString(), 'Future<int>');
+    var f = mainUnit.topLevelVariables[1];
+    expect(f.name, 'f');
+    expect(f.type.toString(), '() → Future<int>');
+    var g = mainUnit.topLevelVariables[2];
+    expect(g.name, 'g');
+    expect(g.type.toString(), '() → Future<int>');
+  }
+
+  void test_asyncClosureReturnType_future() {
+    var mainUnit = checkFile('var f = () async => 0;');
+    var f = mainUnit.topLevelVariables[0];
+    expect(f.name, 'f');
+    expect(f.type.toString(), '() → Future<int>');
+  }
+
   void test_blockBodiedLambdas_async_allReturnsAreFutures() {
     if (!mayCheckTypesOfLocals) {
       return;
@@ -224,7 +249,7 @@
   void test_blockBodiedLambdas_doesNotInferBottom_async_topLevel() {
     var mainUnit = checkFile(r'''
 import 'dart:async';
-var f = /*warning:UNSAFE_BLOCK_CLOSURE_INFERENCE*/() async { return null; };
+var f = /*warning:UNSAFE_BLOCK_CLOSURE_INFERENCE,info:INFERRED_TYPE_CLOSURE*/() async { return null; };
 ''');
     var f = mainUnit.topLevelVariables[0];
     expect(f.type.toString(), '() → Future<dynamic>');
@@ -592,13 +617,16 @@
   void test_constructors_downwardsWithConstraint() {
     // Regression test for https://github.com/dart-lang/sdk/issues/26431
     checkFile(r'''
-class Foo<T extends Iterable> {}
+class A {}
+class B extends A {}
+class Foo<T extends A> {}
 void main() {
-  Foo<List> foo = /*info:INFERRED_TYPE_ALLOCATION*/new Foo();
+  Foo<B> foo = /*info:INFERRED_TYPE_ALLOCATION*/new Foo();
 }
     ''');
   }
 
+  @failingTest
   void test_constructors_inferenceFBounded() {
     // Regression for https://github.com/dart-lang/sdk/issues/26990
     var unit = checkFile('''
@@ -912,7 +940,7 @@
 Future test() async {
   dynamic d;
   List<int> l0 = await /*info:INFERRED_TYPE_LITERAL,error:COULD_NOT_INFER*/[/*info:DYNAMIC_CAST*/d];
-  List<int> l1 = await /*info:INFERRED_TYPE_ALLOCATION*/new Future.value(/*info:INFERRED_TYPE_LITERAL,error:COULD_NOT_INFER*/[/*info:DYNAMIC_CAST*/d]);
+  List<int> l1 = await /*info:INFERRED_TYPE_ALLOCATION*/new Future.value([d]);
 }
 ''');
   }
@@ -920,9 +948,14 @@
   void test_downwardsInferenceForEach() {
     checkFile('''
 import 'dart:async';
+
+abstract class MyStream<T> extends Stream<T> {
+  factory MyStream() => null;
+}
+
 Future main() async {
   for(int x in /*info:INFERRED_TYPE_LITERAL*/[1, 2, 3]) {}
-  await for(int x in /*info:INFERRED_TYPE_ALLOCATION*/new Stream()) {}
+  await for(int x in /*info:INFERRED_TYPE_ALLOCATION*/new MyStream()) {}
 }
 ''');
   }
@@ -1561,11 +1594,16 @@
   void test_downwardsInferenceYieldYieldStar() {
     checkFile('''
 import 'dart:async';
+
+abstract class MyStream<T> extends Stream<T> {
+  factory MyStream() => null;
+}
+
 Stream<List<int>> foo() async* {
   yield /*info:INFERRED_TYPE_LITERAL*/[];
-  yield /*error:YIELD_OF_INVALID_TYPE*/new Stream();
+  yield /*error:YIELD_OF_INVALID_TYPE*/new MyStream();
   yield* /*error:YIELD_OF_INVALID_TYPE*/[];
-  yield* /*info:INFERRED_TYPE_ALLOCATION*/new Stream();
+  yield* /*info:INFERRED_TYPE_ALLOCATION*/new MyStream();
 }
 
 Iterable<Map<int, int>> bar() sync* {
@@ -1577,6 +1615,34 @@
   ''');
   }
 
+  test_dynamic_has_object_methods_viaNonPrefixedIdentifier() {
+    var mainUnit = checkFile('''
+dynamic f() => null;
+var s = f().toString();
+var h = f().hashCode;
+''');
+    var s = mainUnit.topLevelVariables[0];
+    expect(s.name, 's');
+    expect(s.type.toString(), 'String');
+    var h = mainUnit.topLevelVariables[1];
+    expect(h.name, 'h');
+    expect(h.type.toString(), 'int');
+  }
+
+  test_dynamic_has_object_methods_viaPrefixedIdentifier() {
+    var mainUnit = checkFile('''
+dynamic d;
+var s = d.toString();
+var h = d.hashCode;
+''');
+    var s = mainUnit.topLevelVariables[1];
+    expect(s.name, 's');
+    expect(s.type.toString(), 'String');
+    var h = mainUnit.topLevelVariables[2];
+    expect(h.name, 'h');
+    expect(h.type.toString(), 'int');
+  }
+
   void test_fieldRefersToStaticGetter() {
     var mainUnit = checkFile('''
 class C {
@@ -1606,7 +1672,7 @@
   MyFuture() {}
   MyFuture.value(T x) {}
   dynamic noSuchMethod(invocation);
-  MyFuture<S> then<S>(dynamic f(T x), {Function onError}) => null;
+  MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
 void main() {
@@ -1686,7 +1752,7 @@
   MyFuture() {}
   MyFuture.value(T x) {}
   dynamic noSuchMethod(invocation);
-  MyFuture<S> then<S>(dynamic f(T x), {Function onError}) => null;
+  MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
 void main() {
@@ -1695,46 +1761,10 @@
       (x) async => x ? 2 : await new $upwards<int>.value(3));
   $downwards<int> t2 = f.then(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) async { // TODO(leafp): Why the duplicate here?
     return await x ? 2 : new $upwards<int>.value(3);});
-  $downwards<int> t5 = f.then(/*info:INFERRED_TYPE_CLOSURE*/
+  $downwards<int> t5 = f.then(/*info:INFERRED_TYPE_CLOSURE,error:INVALID_CAST_FUNCTION_EXPR*/
       (x) => x ? 2 : new $upwards<int>.value(3));
   $downwards<int> t6 = f.then(/*info:INFERRED_TYPE_CLOSURE*/
-      (x) {return x ? 2 : new $upwards<int>.value(3);});
-}
-''';
-    checkFile(
-        build(declared: "MyFuture", downwards: "Future", upwards: "Future"));
-    checkFile(
-        build(declared: "MyFuture", downwards: "Future", upwards: "MyFuture"));
-    checkFile(
-        build(declared: "MyFuture", downwards: "MyFuture", upwards: "Future"));
-    checkFile(build(
-        declared: "MyFuture", downwards: "MyFuture", upwards: "MyFuture"));
-    checkFile(
-        build(declared: "Future", downwards: "Future", upwards: "MyFuture"));
-    checkFile(
-        build(declared: "Future", downwards: "Future", upwards: "Future"));
-  }
-
-  void test_futureThen_conditional_comment() {
-    String build({String declared, String downwards, String upwards}) => '''
-import 'dart:async';
-class MyFuture<T> implements Future<T> {
-  MyFuture() {}
-  MyFuture.value(T x) {}
-  dynamic noSuchMethod(invocation);
-  MyFuture/*<S>*/ then/*<S>*/(dynamic f(T x), {Function onError}) => null;
-}
-
-void main() {
-  $declared<bool> f;
-  $downwards<int> t1 = f.then(/*info:INFERRED_TYPE_CLOSURE*/
-      (x) async => x ? 2 : await new $upwards<int>.value(3));
-  $downwards<int> t2 = f.then(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) async { // TODO(leafp): Why the duplicate here?
-    return await x ? 2 : new $upwards<int>.value(3);});
-  $downwards<int> t5 = f.then(/*info:INFERRED_TYPE_CLOSURE*/
-      (x) => x ? 2 : new $upwards<int>.value(3));
-  $downwards<int> t6 = f.then(/*info:INFERRED_TYPE_CLOSURE*/
-      (x) {return x ? 2 : new $upwards<int>.value(3);});
+      (x) {return /*warning:DOWN_CAST_COMPOSITE*/x ? 2 : new $upwards<int>.value(3);});
 }
 ''';
     checkFile(
@@ -1768,20 +1798,14 @@
   void test_futureThen_explicitFuture() {
     checkFile(r'''
 import "dart:async";
-main() {
+m1() {
   Future<int> f;
-  var x = f.then<Future<List<int>>>(/*info:INFERRED_TYPE_CLOSURE*/(x) => /*info:INFERRED_TYPE_LITERAL*/[]);
+  var x = f.then<Future<List<int>>>(/*info:INFERRED_TYPE_CLOSURE,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/(x) => []);
   Future<List<int>> y = x;
 }
-    ''');
-  }
-
-  void test_futureThen_explicitFuture_comment() {
-    checkFile(r'''
-import "dart:async";
-main() {
+m2() {
   Future<int> f;
-  var x = f.then/*<Future<List<int>>>*/(/*info:INFERRED_TYPE_CLOSURE*/(x) => /*info:INFERRED_TYPE_LITERAL*/[]);
+  var x = f.then<List<int>>(/*info:INFERRED_TYPE_CLOSURE*/(x) => /*info:INFERRED_TYPE_LITERAL*/[]);
   Future<List<int>> y = x;
 }
     ''');
@@ -1795,37 +1819,7 @@
   MyFuture() {}
   MyFuture.value(T x) {}
   dynamic noSuchMethod(invocation);
-  MyFuture<S> then<S>(dynamic f(T x), {Function onError}) => null;
-}
-
-void main() {
-  var f = foo().then((_) => 2.3);
-  $downwards<int> f2 = /*error:INVALID_ASSIGNMENT*/f;
-
-  // The unnecessary cast is to illustrate that we inferred <double> for
-  // the generic type args, even though we had a return type context.
-  $downwards<num> f3 = /*info:UNNECESSARY_CAST*/foo().then(
-      (_) => 2.3) as $upwards<double>;
-}
-$declared foo() => new $declared<int>.value(1);
-    ''';
-    checkFile(
-        build(declared: "MyFuture", downwards: "Future", upwards: "Future"));
-    checkFile(build(
-        declared: "MyFuture", downwards: "MyFuture", upwards: "MyFuture"));
-    checkFile(
-        build(declared: "Future", downwards: "Future", upwards: "Future"));
-  }
-
-  void test_futureThen_upwards_comment() {
-    // Regression test for https://github.com/dart-lang/sdk/issues/27088.
-    String build({String declared, String downwards, String upwards}) => '''
-import 'dart:async';
-class MyFuture<T> implements Future<T> {
-  MyFuture() {}
-  MyFuture.value(T x) {}
-  dynamic noSuchMethod(invocation);
-  MyFuture/*<S>*/ then/*<S>*/(dynamic f(T x), {Function onError}) => null;
+  MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
 void main() {
@@ -1861,14 +1855,27 @@
     ''');
   }
 
+  void test_futureOr_subtyping() {
+    checkFile(r'''
+import 'dart:async';
+void add(int x) {}
+add2(int y) {}
+main() {
+  Future<int> f;
+  var a = f.then(add);
+  var b = f.then(add2);
+}
+    ''');
+  }
+
   void test_futureUnion_asyncConditional() {
     String build({String declared, String downwards, String upwards}) => '''
 import 'dart:async';
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
-  MyFuture.value(T x) {}
+  MyFuture.value(x) {}
   dynamic noSuchMethod(invocation);
-  MyFuture<S> then<S>(dynamic f(T x), {Function onError}) => null;
+  MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
 $downwards<int> g1(bool x) async {
@@ -1876,7 +1883,7 @@
 $downwards<int> g2(bool x) async =>
   x ? 42 : /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(42);
 $downwards<int> g3(bool x) async {
-  var y = x ? 42 : /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(42);
+  var y = x ? 42 : new $upwards.value(42);
   return y;
 }
     ''';
@@ -1889,7 +1896,7 @@
 import 'dart:async';
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
-  MyFuture.value(T x) {}
+  MyFuture.value(x) {}
   dynamic noSuchMethod(invocation);
   MyFuture/*<S>*/ then/*<S>*/(dynamic f(T x), {Function onError}) => null;
 }
@@ -1899,7 +1906,7 @@
 $downwards<int> g2(bool x) async =>
   x ? 42 : /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(42);
 $downwards<int> g3(bool x) async {
-  var y = x ? 42 : /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(42);
+  var y = x ? 42 : new $upwards.value(42);
   return y;
 }
     ''';
@@ -1918,16 +1925,15 @@
 import 'dart:async';
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
-  MyFuture.value([T x]) {}
+  MyFuture.value([x]) {}
   dynamic noSuchMethod(invocation);
-  MyFuture<S> then<S>(dynamic f(T x), {Function onError}) => null;
+  MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
 $declared f;
 // Instantiates Future<int>
 $downwards<int> t1 = f.then((_) =>
-   ${allocInfo}new /*error:COULD_NOT_INFER*/$upwards.value(
-     /*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi'));
+   ${allocInfo}new $upwards.value('hi'));
 
 // Instantiates List<int>
 $downwards<List<int>> t2 = f.then((_) => /*info:INFERRED_TYPE_LITERAL*/[3]);
@@ -1938,49 +1944,6 @@
 ''';
     }
 
-    ;
-    checkFile(
-        build(declared: "MyFuture", downwards: "Future", upwards: "Future"));
-    checkFile(
-        build(declared: "MyFuture", downwards: "Future", upwards: "MyFuture"));
-    checkFile(
-        build(declared: "Future", downwards: "Future", upwards: "Future"));
-    checkFile(
-        build(declared: "Future", downwards: "Future", upwards: "MyFuture"));
-  }
-
-  void test_futureUnion_downwards_comment() {
-    String build({String declared, String downwards, String upwards}) {
-      // TODO(leafp): The use of matchTypes in visitInstanceCreationExpression
-      // in the resolver visitor isn't powerful enough to catch this for the
-      // subclass.  See the TODO there.
-      var allocInfo =
-          (upwards == "Future") ? "/*info:INFERRED_TYPE_ALLOCATION*/" : "";
-      return '''
-import 'dart:async';
-class MyFuture<T> implements Future<T> {
-  MyFuture() {}
-  MyFuture.value([T x]) {}
-  dynamic noSuchMethod(invocation);
-  MyFuture/*<S>*/ then/*<S>*/(dynamic f(T x), {Function onError}) => null;
-}
-
-$declared f;
-// Instantiates Future<int>
-$downwards<int> t1 = f.then((_) =>
-   ${allocInfo}new /*error:COULD_NOT_INFER*/$upwards.value(
-     /*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi'));
-
-// Instantiates List<int>
-$downwards<List<int>> t2 = f.then((_) => /*info:INFERRED_TYPE_LITERAL*/[3]);
-$downwards<List<int>> g2() async { return /*info:INFERRED_TYPE_LITERAL*/[3]; }
-$downwards<List<int>> g3() async {
-  return /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(
-      /*info:INFERRED_TYPE_LITERAL*/[3]); }
-''';
-    }
-
-    ;
     checkFile(
         build(declared: "MyFuture", downwards: "Future", upwards: "Future"));
     checkFile(
@@ -2582,7 +2545,7 @@
     // TODO(jmesserly): we should change how this inference works.
     // For now this test will cover what we use.
     checkFile('''
-import 'dart:_foreign_helper' show JS;
+/*error:IMPORT_INTERNAL_LIBRARY*/import 'dart:_foreign_helper' show JS;
 main() {
   String x = /*error:INVALID_ASSIGNMENT*/JS('int', '42');
   var y = JS('String', '"hello"');
@@ -2602,7 +2565,10 @@
   Iterable<Future<int>> list = <int>[1, 2, 3].map(make);
   Future<List<int>> results = Future.wait(list);
   Future<String> results2 = results.then((List<int> list)
-    => list.fold('', /*info:INFERRED_TYPE_CLOSURE*/(x, y) => x + y.toString()));
+    => list.fold('', /*info:INFERRED_TYPE_CLOSURE*/(x, y) => /*info:DYNAMIC_CAST,info:DYNAMIC_INVOKE*/x /*error:UNDEFINED_OPERATOR*/+ y.toString()));
+
+  Future<String> results3 = results.then((List<int> list)
+    => list.fold('', /*info:INFERRED_TYPE_CLOSURE*/(String x, y) => x + y.toString()));
 }
 ''');
   }
@@ -4212,6 +4178,16 @@
 ''');
   }
 
+  void test_inferVariableVoid() {
+    var mainUnit = checkFile('''
+void f() {}
+var x = /*info:USE_OF_VOID_RESULT*/f();
+    ''');
+    var x = mainUnit.topLevelVariables[0];
+    expect(x.name, 'x');
+    expect(x.type.toString(), 'void');
+  }
+
   void test_instanceField_basedOnInstanceField_betweenCycles() {
     // Verify that all instance fields in one library cycle are inferred before
     // an instance fields in a dependent library cycle.
@@ -4277,7 +4253,7 @@
 
   void test_instantiateToBounds_generic2_hasBound_definedAfter() {
     var unit = checkFile(r'''
-class B<T extends A> {}
+class B<T extends /*error:NOT_INSTANTIATED_BOUND*/A> {}
 class A<T extends int> {}
 B v = null;
 ''');
@@ -4287,7 +4263,7 @@
   void test_instantiateToBounds_generic2_hasBound_definedBefore() {
     var unit = checkFile(r'''
 class A<T extends int> {}
-class B<T extends A> {}
+class B<T extends /*error:NOT_INSTANTIATED_BOUND*/A> {}
 B v = null;
 ''');
     expect(unit.topLevelVariables[0].type.toString(), 'B<A<dynamic>>');
@@ -4296,7 +4272,7 @@
   void test_instantiateToBounds_generic2_noBound() {
     var unit = checkFile(r'''
 class A<T> {}
-class B<T extends A> {}
+class B<T extends /*error:NOT_INSTANTIATED_BOUND*/A> {}
 B v = null;
 ''');
     expect(unit.topLevelVariables[0].type.toString(), 'B<A<dynamic>>');
@@ -5347,54 +5323,23 @@
 
 void printRunning() { print("running"); }
 var x = run<dynamic>(printRunning);
-var y = run(printRunning);
+var y = /*info:USE_OF_VOID_RESULT*/run(printRunning);
 
 main() {
   void printRunning() { print("running"); }
   var x = run<dynamic>(printRunning);
-  var y = run(printRunning);
+  var y = /*info:USE_OF_VOID_RESULT*/run(printRunning);
   x = 123;
   x = 'hi';
-  y = 123;
-  y = 'hi';
+  y = /*error:INVALID_ASSIGNMENT*/123;
+  y = /*error:INVALID_ASSIGNMENT*/'hi';
 }
     ''');
 
     var x = unit.topLevelVariables[0];
     var y = unit.topLevelVariables[1];
     expect(x.type.toString(), 'dynamic');
-    expect(y.type.toString(), 'dynamic');
-  }
-
-  void test_voidReturnTypeSubtypesDynamic_comment() {
-    var unit = checkFile(r'''
-/*=T*/ run/*<T>*/(/*=T*/ f()) {
-  print("running");
-  var t = f();
-  print("done running");
-  return t;
-}
-
-
-void printRunning() { print("running"); }
-var x = run/*<dynamic>*/(printRunning);
-var y = run(printRunning);
-
-main() {
-  void printRunning() { print("running"); }
-  var x = run/*<dynamic>*/(printRunning);
-  var y = run(printRunning);
-  x = 123;
-  x = 'hi';
-  y = 123;
-  y = 'hi';
-}
-    ''');
-
-    var x = unit.topLevelVariables[0];
-    var y = unit.topLevelVariables[1];
-    expect(x.type.toString(), 'dynamic');
-    expect(y.type.toString(), 'dynamic');
+    expect(y.type.toString(), 'void');
   }
 }
 
diff --git a/pkg/analyzer/test/test_all.dart b/pkg/analyzer/test/test_all.dart
index d9cdf90..2f6954f 100644
--- a/pkg/analyzer/test/test_all.dart
+++ b/pkg/analyzer/test/test_all.dart
@@ -8,6 +8,7 @@
 
 import 'cancelable_future_test.dart' as cancelable_future_test;
 import 'context/test_all.dart' as context;
+import 'dart/test_all.dart' as dart;
 import 'file_system/test_all.dart' as file_system;
 import 'generated/test_all.dart' as generated;
 import 'instrumentation/test_all.dart' as instrumentation;
@@ -20,6 +21,7 @@
   defineReflectiveSuite(() {
     cancelable_future_test.main();
     context.main();
+    dart.main();
     file_system.main();
     generated.main();
     instrumentation.main();
diff --git a/pkg/analyzer/test/utils.dart b/pkg/analyzer/test/utils.dart
index 6d70357..4d1314e 100644
--- a/pkg/analyzer/test/utils.dart
+++ b/pkg/analyzer/test/utils.dart
@@ -234,6 +234,11 @@
   Asserter<DartType> get isNum => isType(_typeProvider.numType);
 
   /**
+   * Primitive assertion for the Object type
+   */
+  Asserter<DartType> get isObject => isType(_typeProvider.objectType);
+
+  /**
    * Primitive assertion for the string type
    */
   Asserter<DartType> get isString => isType(_typeProvider.stringType);
diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
index f33706c..186ed82 100644
--- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
@@ -4,6 +4,7 @@
 
 library analyzer_cli.src.analyzer_impl;
 
+import 'dart:async';
 import 'dart:collection';
 import 'dart:io';
 
@@ -11,8 +12,9 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/source/error_processor.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
 import 'package:analyzer/src/generated/java_io.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
@@ -37,7 +39,9 @@
   final CommandLineOptions options;
   final int startTime;
 
+  final AnalysisOptions analysisOptions;
   final AnalysisContext context;
+  final AnalysisDriver analysisDriver;
 
   /// Accumulated analysis statistics.
   final AnalysisStats stats;
@@ -61,8 +65,8 @@
   /// specified the "--package-warnings" option.
   String _selfPackageName;
 
-  AnalyzerImpl(this.context, this.librarySource, this.options, this.stats,
-      this.startTime);
+  AnalyzerImpl(this.analysisOptions, this.context, this.analysisDriver,
+      this.librarySource, this.options, this.stats, this.startTime);
 
   /// Returns the maximal [ErrorSeverity] of the recorded errors.
   ErrorSeverity get maxErrorSeverity {
@@ -111,24 +115,34 @@
     }
   }
 
-  /// Treats the [sourcePath] as the top level library and analyzes it using a
-  /// synchronous algorithm over the analysis engine. If [printMode] is `0`,
-  /// then no error or performance information is printed. If [printMode] is `1`,
-  /// then both will be printed. If [printMode] is `2`, then only performance
-  /// information will be printed, and it will be marked as being for a cold VM.
-  ErrorSeverity analyzeSync({int printMode: 1}) {
+  /// Treats the [sourcePath] as the top level library and analyzes it using
+  /// the analysis engine. If [printMode] is `0`, then no error or performance
+  /// information is printed. If [printMode] is `1`, then both will be printed.
+  /// If [printMode] is `2`, then only performance information will be printed,
+  /// and it will be marked as being for a cold VM.
+  Future<ErrorSeverity> analyze({int printMode: 1}) async {
     setupForAnalysis();
-    return _analyzeSync(printMode);
+    return await _analyze(printMode);
   }
 
   /// Fills [errorInfos] using [sources].
-  void prepareErrors() {
-    return _prepareErrorsTag.makeCurrentWhile(() {
+  Future<Null> prepareErrors() async {
+    PerformanceTag previous = _prepareErrorsTag.makeCurrent();
+    try {
       for (Source source in sources) {
-        context.computeErrors(source);
-        errorInfos.add(context.getErrors(source));
+        if (analysisDriver != null) {
+          String path = source.fullName;
+          AnalysisResult analysisResult = await analysisDriver.getResult(path);
+          errorInfos.add(new AnalysisErrorInfoImpl(
+              analysisResult.errors, analysisResult.lineInfo));
+        } else {
+          context.computeErrors(source);
+          errorInfos.add(context.getErrors(source));
+        }
       }
-    });
+    } finally {
+      previous.makeCurrent();
+    }
   }
 
   /// Fills [sources].
@@ -148,8 +162,7 @@
     }
   }
 
-  /// The sync version of analysis.
-  ErrorSeverity _analyzeSync(int printMode) {
+  Future<ErrorSeverity> _analyze(int printMode) async {
     // Don't try to analyze parts.
     if (context.computeKindOf(librarySource) == SourceKind.PART) {
       stderr.writeln("Only libraries can be analyzed.");
@@ -157,9 +170,10 @@
           "${librarySource.fullName} is a part and can not be analyzed.");
       return ErrorSeverity.ERROR;
     }
-    var libraryElement = _resolveLibrary();
+
+    LibraryElement libraryElement = await _resolveLibrary();
     prepareSources(libraryElement);
-    prepareErrors();
+    await prepareErrors();
 
     // Print errors and performance numbers.
     if (printMode == 1) {
@@ -240,12 +254,22 @@
   }
 
   ProcessedSeverity _processError(AnalysisError error) =>
-      processError(error, options, context);
+      processError(error, options, analysisOptions);
 
-  LibraryElement _resolveLibrary() {
-    return _resolveLibraryTag.makeCurrentWhile(() {
-      return context.computeLibraryElement(librarySource);
-    });
+  Future<LibraryElement> _resolveLibrary() async {
+    PerformanceTag previous = _resolveLibraryTag.makeCurrent();
+    try {
+      if (analysisDriver != null) {
+        String path = librarySource.fullName;
+        analysisDriver.priorityFiles = [path];
+        AnalysisResult analysisResult = await analysisDriver.getResult(path);
+        return analysisResult.unit.element.library;
+      } else {
+        return context.computeLibraryElement(librarySource);
+      }
+    } finally {
+      previous.makeCurrent();
+    }
   }
 
   /// Compute the severity of the error; however:
@@ -255,10 +279,10 @@
   ///   * if [options.lintsAreFatal] is true, escalate lints to errors.
   static ErrorSeverity computeSeverity(
       AnalysisError error, CommandLineOptions options,
-      [AnalysisContext context]) {
-    if (context != null) {
+      [AnalysisOptions analysisOptions]) {
+    if (analysisOptions != null) {
       ErrorProcessor processor =
-          ErrorProcessor.getProcessor(context.analysisOptions, error);
+          ErrorProcessor.getProcessor(analysisOptions, error);
       // If there is a processor for this error, defer to it.
       if (processor != null) {
         return processor.severity;
@@ -296,8 +320,8 @@
   /// Check various configuration options to get a desired severity for this
   /// [error] (or `null` if it's to be suppressed).
   static ProcessedSeverity processError(AnalysisError error,
-      CommandLineOptions options, AnalysisContext context) {
-    ErrorSeverity severity = computeSeverity(error, options, context);
+      CommandLineOptions options, AnalysisOptions analysisOptions) {
+    ErrorSeverity severity = computeSeverity(error, options, analysisOptions);
     bool isOverridden = false;
 
     // Skip TODOs categorically (unless escalated to ERROR or HINT.)
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index 5beef11..8249e77 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -225,8 +225,8 @@
       for (Source source in explicitSources) {
         AnalysisErrorInfo errorInfo = context.getErrors(source);
         for (AnalysisError error in errorInfo.errors) {
-          ProcessedSeverity processedSeverity =
-              AnalyzerImpl.processError(error, options, context);
+          ProcessedSeverity processedSeverity = AnalyzerImpl.processError(
+              error, options, context.analysisOptions);
           if (processedSeverity != null) {
             maxSeverity = maxSeverity.max(processedSeverity.severity);
           }
@@ -319,7 +319,7 @@
         options,
         stats,
         (AnalysisError error) =>
-            AnalyzerImpl.processError(error, options, context));
+            AnalyzerImpl.processError(error, options, context.analysisOptions));
     for (Source source in explicitSources) {
       AnalysisErrorInfo errorInfo = context.getErrors(source);
       formatter.formatErrors([errorInfo]);
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index c9c59b6..e77699f 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -19,6 +19,9 @@
 import 'package:analyzer/source/pub_package_map_provider.dart';
 import 'package:analyzer/source/sdk_ext.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/sdk/sdk.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -32,6 +35,7 @@
 import 'package:analyzer/src/lint/registry.dart';
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/source/source_resource.dart';
+import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/summary/summary_sdk.dart' show SummaryBasedDartSdk;
 import 'package:analyzer/src/task/options.dart';
@@ -67,12 +71,14 @@
   return linterNode is YamlMap && linterNode.containsKey('rules');
 }
 
-typedef ErrorSeverity _BatchRunnerHandler(List<String> args);
+typedef Future<ErrorSeverity> _BatchRunnerHandler(List<String> args);
 
 class Driver implements CommandLineStarter {
   static final PerformanceTag _analyzeAllTag =
       new PerformanceTag("Driver._analyzeAll");
 
+  static ByteStore analysisDriverByteStore = new MemoryByteStore();
+
   /// The plugins that are defined outside the `analyzer_cli` package.
   List<Plugin> _userDefinedPlugins = <Plugin>[];
 
@@ -80,6 +86,8 @@
   /// `null` if [_analyzeAll] hasn't been called yet.
   InternalAnalysisContext _context;
 
+  AnalysisDriver analysisDriver;
+
   /// The total number of source files loaded by an AnalysisContext.
   int _analyzedFileCount = 0;
 
@@ -113,7 +121,7 @@
   }
 
   @override
-  void start(List<String> args) {
+  Future<Null> start(List<String> args) async {
     if (_context != null) {
       throw new StateError("start() can only be called once");
     }
@@ -134,12 +142,12 @@
         io.exitCode = severity.ordinal;
       }
     } else if (options.shouldBatch) {
-      _BatchRunner.runAsBatch(args, (List<String> args) {
+      _BatchRunner.runAsBatch(args, (List<String> args) async {
         CommandLineOptions options = CommandLineOptions.parse(args);
-        return _analyzeAll(options);
+        return await _analyzeAll(options);
       });
     } else {
-      ErrorSeverity severity = _analyzeAll(options);
+      ErrorSeverity severity = await _analyzeAll(options);
       // In case of error propagate exit code.
       if (severity == ErrorSeverity.ERROR) {
         io.exitCode = severity.ordinal;
@@ -157,14 +165,17 @@
     }
   }
 
-  ErrorSeverity _analyzeAll(CommandLineOptions options) {
-    return _analyzeAllTag.makeCurrentWhile(() {
-      return _analyzeAllImpl(options);
-    });
+  Future<ErrorSeverity> _analyzeAll(CommandLineOptions options) async {
+    PerformanceTag previous = _analyzeAllTag.makeCurrent();
+    try {
+      return await _analyzeAllImpl(options);
+    } finally {
+      previous.makeCurrent();
+    }
   }
 
   /// Perform analysis according to the given [options].
-  ErrorSeverity _analyzeAllImpl(CommandLineOptions options) {
+  Future<ErrorSeverity> _analyzeAllImpl(CommandLineOptions options) async {
     if (!options.machineFormat) {
       outSink.writeln("Analyzing ${options.sourceFiles}...");
     }
@@ -204,8 +215,15 @@
         }
         sourcesToAnalyze.add(source);
       }
+
+      if (analysisDriver != null) {
+        files.forEach((file) {
+          analysisDriver.addFile(file.path);
+        });
+      } else {
+        context.applyChanges(changeSet);
+      }
     }
-    context.applyChanges(changeSet);
 
     // Analyze the libraries.
     ErrorSeverity allResult = ErrorSeverity.NONE;
@@ -216,7 +234,7 @@
         parts.add(source);
         continue;
       }
-      ErrorSeverity status = _runAnalyzer(source, options);
+      ErrorSeverity status = await _runAnalyzer(source, options);
       allResult = allResult.max(status);
       libUris.add(source.uri);
     }
@@ -516,6 +534,11 @@
     // Once options and embedders are processed, setup the SDK.
     _setupSdk(options, useSummaries);
 
+    PackageBundle sdkBundle = sdk.getLinkedBundle();
+    if (sdkBundle != null) {
+      summaryDataStore.addBundle(null, sdkBundle);
+    }
+
     // Choose a package resolution policy and a diet parsing policy based on
     // the command-line options.
     SourceFactory sourceFactory = _chooseUriResolutionPolicy(
@@ -530,8 +553,28 @@
     });
 
     _context.sourceFactory = sourceFactory;
-    _context.resultProvider =
-        new InputPackagesResultProvider(_context, summaryDataStore);
+
+    if (options.enableNewAnalysisDriver) {
+      PerformanceLog log = new PerformanceLog(null);
+      AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
+      analysisDriver = new AnalysisDriver(
+          scheduler,
+          log,
+          resourceProvider,
+          analysisDriverByteStore,
+          new FileContentOverlay(),
+          'test',
+          context.sourceFactory,
+          context.analysisOptions);
+      analysisDriver.results.listen((_) {});
+      analysisDriver.exceptions.listen((_) {});
+      scheduler.start();
+    } else {
+      if (sdkBundle != null) {
+        _context.resultProvider =
+            new InputPackagesResultProvider(_context, summaryDataStore);
+      }
+    }
   }
 
   /// Return discovered packagespec, or `null` if none is found.
@@ -625,11 +668,12 @@
   }
 
   /// Analyze a single source.
-  ErrorSeverity _runAnalyzer(Source source, CommandLineOptions options) {
+  Future<ErrorSeverity> _runAnalyzer(
+      Source source, CommandLineOptions options) async {
     int startTime = currentTimeMillis();
-    AnalyzerImpl analyzer =
-        new AnalyzerImpl(_context, source, options, stats, startTime);
-    var errorSeverity = analyzer.analyzeSync();
+    AnalyzerImpl analyzer = new AnalyzerImpl(_context.analysisOptions, _context,
+        analysisDriver, source, options, stats, startTime);
+    ErrorSeverity errorSeverity = await analyzer.analyze();
     if (errorSeverity == ErrorSeverity.ERROR) {
       io.exitCode = errorSeverity.ordinal;
     }
@@ -801,7 +845,7 @@
     // Read line from stdin.
     Stream cmdLine =
         io.stdin.transform(UTF8.decoder).transform(new LineSplitter());
-    cmdLine.listen((String line) {
+    cmdLine.listen((String line) async {
       // Maybe finish.
       if (line.isEmpty) {
         var time = stopwatch.elapsedMilliseconds;
@@ -819,7 +863,7 @@
       // Analyze single set of arguments.
       try {
         totalTests++;
-        ErrorSeverity result = handler(args);
+        ErrorSeverity result = await handler(args);
         bool resultPass = result != ErrorSeverity.ERROR;
         if (!resultPass) {
           testsFailed++;
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index c83cffc..7dd9de9 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -33,6 +33,8 @@
 
 /// Analyzer commandline configuration options.
 class CommandLineOptions {
+  final bool enableNewAnalysisDriver = false;
+
   /// The path to output analysis results when in build mode.
   final String buildAnalysisOutput;
 
@@ -198,13 +200,13 @@
   bool get enableSuperMixins =>
       contextBuilderOptions.defaultOptions.enableSuperMixins;
 
+  /// The path to a `.packages` configuration file
+  String get packageConfigPath => contextBuilderOptions.defaultPackageFilePath;
+
   /// The path to the package root
   String get packageRootPath =>
       contextBuilderOptions.defaultPackagesDirectoryPath;
 
-  /// The path to a `.packages` configuration file
-  String get packageConfigPath => contextBuilderOptions.defaultPackageFilePath;
-
   /// Parse [args] into [CommandLineOptions] describing the specified
   /// analyzer options. In case of a format error, calls [printAndFail], which
   /// by default prints an error message to stderr and exits.
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index 0c18639..ca07498 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -4,6 +4,7 @@
 
 library analyzer_cli.test.driver;
 
+import 'dart:async';
 import 'dart:io';
 
 import 'package:analyzer/error/error.dart';
@@ -51,65 +52,65 @@
 
   group('Driver', () {
     group('options', () {
-      test('todos', () {
-        drive('data/file_with_todo.dart');
+      test('todos', () async {
+        await drive('data/file_with_todo.dart');
         expect(outSink.toString().contains('[info]'), isFalse);
       });
     });
 
     group('exit codes', () {
-      test('fatal hints', () {
-        drive('data/file_with_hint.dart', args: ['--fatal-hints']);
+      test('fatal hints', () async {
+        await drive('data/file_with_hint.dart', args: ['--fatal-hints']);
         expect(exitCode, 3);
       });
 
-      test('not fatal hints', () {
-        drive('data/file_with_hint.dart');
+      test('not fatal hints', () async {
+        await drive('data/file_with_hint.dart');
         expect(exitCode, 0);
       });
 
-      test('fatal errors', () {
-        drive('data/file_with_error.dart');
+      test('fatal errors', () async {
+        await drive('data/file_with_error.dart');
         expect(exitCode, 3);
       });
 
-      test('not fatal warnings', () {
-        drive('data/file_with_warning.dart');
+      test('not fatal warnings', () async {
+        await drive('data/file_with_warning.dart');
         expect(exitCode, 0);
       });
 
-      test('fatal warnings', () {
-        drive('data/file_with_warning.dart', args: ['--fatal-warnings']);
+      test('fatal warnings', () async {
+        await drive('data/file_with_warning.dart', args: ['--fatal-warnings']);
         expect(exitCode, 3);
       });
 
-      test('missing options file', () {
-        drive('data/test_file.dart', options: 'data/NO_OPTIONS_HERE');
+      test('missing options file', () async {
+        await drive('data/test_file.dart', options: 'data/NO_OPTIONS_HERE');
         expect(exitCode, 3);
       });
 
-      test('missing dart file', () {
-        drive('data/NO_DART_FILE_HERE.dart');
+      test('missing dart file', () async {
+        await drive('data/NO_DART_FILE_HERE.dart');
         expect(exitCode, 3);
       });
 
-      test('part file', () {
-        drive('data/library_and_parts/part2.dart');
+      test('part file', () async {
+        await drive('data/library_and_parts/part2.dart');
         expect(exitCode, 3);
       });
 
-      test('non-dangling part file', () {
+      test('non-dangling part file', () async {
         Driver driver = new Driver();
-        driver.start([
+        await driver.start([
           path.join(testDirectory, 'data/library_and_parts/lib.dart'),
           path.join(testDirectory, 'data/library_and_parts/part1.dart')
         ]);
         expect(exitCode, 0);
       });
 
-      test('extra part file', () {
+      test('extra part file', () async {
         Driver driver = new Driver();
-        driver.start([
+        await driver.start([
           path.join(testDirectory, 'data/library_and_parts/lib.dart'),
           path.join(testDirectory, 'data/library_and_parts/part1.dart'),
           path.join(testDirectory, 'data/library_and_parts/part2.dart')
@@ -122,12 +123,14 @@
       void createTests(String designator, String optionsFileName) {
         group('lints in options - $designator', () {
           // Shared lint command.
-          void runLinter() => drive('data/linter_project/test_file.dart',
-              options: 'data/linter_project/$optionsFileName',
-              args: ['--lints']);
+          Future<Null> runLinter() async {
+            return await drive('data/linter_project/test_file.dart',
+                options: 'data/linter_project/$optionsFileName',
+                args: ['--lints']);
+          }
 
-          test('gets analysis options', () {
-            runLinter();
+          test('gets analysis options', () async {
+            await runLinter();
 
             /// Lints should be enabled.
             expect(driver.context.analysisOptions.lint, isTrue);
@@ -137,8 +140,8 @@
             expect(lintNames, orderedEquals(['camel_case_types']));
           });
 
-          test('generates lints', () {
-            runLinter();
+          test('generates lints', () async {
+            await runLinter();
             expect(outSink.toString(),
                 contains('[lint] Name types using UpperCamelCase.'));
           });
@@ -146,12 +149,14 @@
 
         group('default lints - $designator', () {
           // Shared lint command.
-          void runLinter() => drive('data/linter_project/test_file.dart',
-              options: 'data/linter_project/$optionsFileName',
-              args: ['--lints']);
+          Future<Null> runLinter() async {
+            return await drive('data/linter_project/test_file.dart',
+                options: 'data/linter_project/$optionsFileName',
+                args: ['--lints']);
+          }
 
-          test('gets default lints', () {
-            runLinter();
+          test('gets default lints', () async {
+            await runLinter();
 
             /// Lints should be enabled.
             expect(driver.context.analysisOptions.lint, isTrue);
@@ -161,8 +166,8 @@
             expect(lintNames, contains('camel_case_types'));
           });
 
-          test('generates lints', () {
-            runLinter();
+          test('generates lints', () async {
+            await runLinter();
             expect(outSink.toString(),
                 contains('[lint] Name types using UpperCamelCase.'));
           });
@@ -170,21 +175,23 @@
 
         group('no `--lints` flag (none in options) - $designator', () {
           // Shared lint command.
-          void runLinter() => drive('data/no_lints_project/test_file.dart',
-              options: 'data/no_lints_project/$optionsFileName');
+          Future<Null> runLinter() async {
+            return await drive('data/no_lints_project/test_file.dart',
+                options: 'data/no_lints_project/$optionsFileName');
+          }
 
-          test('lints disabled', () {
-            runLinter();
+          test('lints disabled', () async {
+            await runLinter();
             expect(driver.context.analysisOptions.lint, isFalse);
           });
 
-          test('no registered lints', () {
-            runLinter();
+          test('no registered lints', () async {
+            await runLinter();
             expect(getLints(driver.context), isEmpty);
           });
 
-          test('no generated warnings', () {
-            runLinter();
+          test('no generated warnings', () async {
+            await runLinter();
             expect(outSink.toString(), contains('No issues found'));
           });
         });
@@ -223,11 +230,13 @@
       void createTests(String designator, String optionsFileName) {
         group('basic config - $designator', () {
           // Shared driver command.
-          void doDrive() => drive('data/options_tests_project/test_file.dart',
-              options: 'data/options_tests_project/$optionsFileName');
+          Future<Null> doDrive() async {
+            await drive('data/options_tests_project/test_file.dart',
+                options: 'data/options_tests_project/$optionsFileName');
+          }
 
-          test('filters', () {
-            doDrive();
+          test('filters', () async {
+            await doDrive();
             expect(processors, hasLength(3));
 
             // unused_local_variable: ignore
@@ -251,13 +260,13 @@
                 outSink.toString(), contains("1 error and 1 warning found."));
           });
 
-          test('language', () {
-            doDrive();
+          test('language', () async {
+            await doDrive();
             expect(driver.context.analysisOptions.enableSuperMixins, isTrue);
           });
 
-          test('strongMode', () {
-            doDrive();
+          test('strongMode', () async {
+            await doDrive();
             expect(driver.context.analysisOptions.strongMode, isTrue);
             //https://github.com/dart-lang/sdk/issues/26129
             AnalysisContext sdkContext =
@@ -268,12 +277,14 @@
 
         group('with flags - $designator', () {
           // Shared driver command.
-          void doDrive() => drive('data/options_tests_project/test_file.dart',
-              args: ['--fatal-warnings'],
-              options: 'data/options_tests_project/$optionsFileName');
+          Future<Null> doDrive() async {
+            await drive('data/options_tests_project/test_file.dart',
+                args: ['--fatal-warnings'],
+                options: 'data/options_tests_project/$optionsFileName');
+          }
 
-          test('override fatal warning', () {
-            doDrive();
+          test('override fatal warning', () async {
+            await doDrive();
             // missing_return: error
             var undefined_function = new AnalysisError(new TestSource(), 0, 1,
                 StaticTypeWarningCode.UNDEFINED_FUNCTION, [
@@ -293,10 +304,10 @@
       createTests('old', AnalysisEngine.ANALYSIS_OPTIONS_FILE);
       createTests('new', AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
 
-      test('include directive', () {
+      test('include directive', () async {
         String testDir = path.join(
             testDirectory, 'data', 'options_include_directive_tests_project');
-        drive(
+        await drive(
           path.join(testDir, 'lib', 'test_file.dart'),
           args: [
             '--fatal-warnings',
@@ -316,8 +327,9 @@
     void createTests(String designator, String optionsFileName) {
       group('build-mode - $designator', () {
         // Shared driver command.
-        void doDrive(String filePath, {List<String> additionalArgs: const []}) {
-          drive('file:///test_file.dart|$filePath',
+        Future<Null> doDrive(String filePath,
+            {List<String> additionalArgs: const []}) async {
+          await drive('file:///test_file.dart|$filePath',
               args: [
                 '--dart-sdk',
                 findSdkDirForSummaries(),
@@ -327,8 +339,8 @@
               options: 'data/options_tests_project/$optionsFileName');
         }
 
-        test('no stats', () {
-          doDrive('data/test_file.dart');
+        test('no stats', () async {
+          await doDrive('data/test_file.dart');
           // Should not print stat summary.
           expect(outSink.toString(), isEmpty);
           expect(errorSink.toString(), isEmpty);
@@ -337,21 +349,21 @@
 
         test(
             'Fails if file not found, even when --build-suppress-exit-code is given',
-            () {
-          doDrive('data/non_existent_file.dart',
+            () async {
+          await doDrive('data/non_existent_file.dart',
               additionalArgs: ['--build-suppress-exit-code']);
           expect(exitCode, isNot(0));
         });
 
-        test('Fails if there are errors', () {
-          doDrive('data/file_with_error.dart');
+        test('Fails if there are errors', () async {
+          await doDrive('data/file_with_error.dart');
           expect(exitCode, isNot(0));
         });
 
         test(
             'Succeeds if there are errors, when --build-suppress-exit-code is given',
-            () {
-          doDrive('data/file_with_error.dart',
+            () async {
+          await doDrive('data/file_with_error.dart',
               additionalArgs: ['--build-suppress-exit-code']);
           expect(exitCode, 0);
         });
@@ -446,15 +458,16 @@
 /// [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.
-void drive(String source,
-    {String options: emptyOptionsFile, List<String> args: const <String>[]}) {
+Future<Null> drive(String source,
+    {String options: emptyOptionsFile,
+    List<String> args: const <String>[]}) async {
   driver = new Driver();
   var cmd = [
     '--options',
     path.join(testDirectory, options),
     adjustFileSpec(source)
   ]..addAll(args);
-  driver.start(cmd);
+  await driver.start(cmd);
 }
 
 /// Try to find a appropriate directory to pass to "--dart-sdk" that will
diff --git a/pkg/analyzer_cli/test/embedder_test.dart b/pkg/analyzer_cli/test/embedder_test.dart
index c1c544c..eaa790a 100644
--- a/pkg/analyzer_cli/test/embedder_test.dart
+++ b/pkg/analyzer_cli/test/embedder_test.dart
@@ -24,15 +24,16 @@
       outSink = new StringBuffer();
       errorSink = new StringBuffer();
     });
+
     tearDown(() {
       outSink = savedOutSink;
       errorSink = savedErrorSink;
       exitCode = savedExitCode;
     });
 
-    test('resolution', wrap(() {
+    test('resolution', wrap(() async {
       var testDir = path.join(testDirectory, 'data', 'embedder_client');
-      new Driver().start([
+      await new Driver().start([
         '--packages',
         path.join(testDir, '_packages'),
         path.join(testDir, 'embedder_yaml_user.dart')
@@ -42,10 +43,10 @@
       expect(outSink.toString(), contains('No issues found'));
     }));
 
-    test('sdk setup', wrap(() {
+    test('sdk setup', wrap(() async {
       var testDir = path.join(testDirectory, 'data', 'embedder_client');
       Driver driver = new Driver();
-      driver.start([
+      await driver.start([
         '--packages',
         path.join(testDir, '_packages'),
         path.join(testDir, 'embedder_yaml_user.dart')
@@ -60,9 +61,9 @@
 
 /// Wrap a function call to dump stdout and stderr in case of an exception.
 Function wrap(Function f) {
-  return () {
+  return () async {
     try {
-      f();
+      await f();
     } catch (e) {
       if (outSink.toString().isNotEmpty) {
         print('stdout:');
diff --git a/pkg/analyzer_cli/test/package_prefix_test.dart b/pkg/analyzer_cli/test/package_prefix_test.dart
index 1a3f9b0..4bda02e 100644
--- a/pkg/analyzer_cli/test/package_prefix_test.dart
+++ b/pkg/analyzer_cli/test/package_prefix_test.dart
@@ -1,3 +1,4 @@
+import 'dart:async';
 import 'dart:io' show exitCode;
 
 import 'package:analyzer_cli/src/driver.dart' show Driver, outSink, errorSink;
@@ -20,8 +21,8 @@
       runner = null;
     });
 
-    test('shows only the hint whose package matches the prefix', () {
-      runner.run([
+    test('shows only the hint whose package matches the prefix', () async {
+      await runner.run2([
         "--packages",
         join(testDirectory, 'data', 'package_prefix', 'packagelist'),
         "--x-package-warnings-prefix=f",
@@ -58,8 +59,9 @@
   String get stderr => _stderr.toString();
 
   String get stdout => _stdout.toString();
-  void run(List<String> args) {
-    new Driver().start(args);
+
+  Future<Null> run2(List<String> args) async {
+    await new Driver().start(args);
     if (stderr.isNotEmpty) {
       fail("Unexpected output to stderr:\n$stderr");
     }
diff --git a/pkg/analyzer_cli/test/sdk_ext_test.dart b/pkg/analyzer_cli/test/sdk_ext_test.dart
index 535897c..48a02ce 100644
--- a/pkg/analyzer_cli/test/sdk_ext_test.dart
+++ b/pkg/analyzer_cli/test/sdk_ext_test.dart
@@ -40,12 +40,12 @@
 
     test('.packages file specified', () async {
       String testDir = path.join(testDirectory, 'data', 'packages_file');
-      Driver driver = new Driver()
-        ..start([
-          '--packages',
-          path.join(testDir, '_packages'),
-          path.join(testDir, 'sdk_ext_user.dart')
-        ]);
+      Driver driver = new Driver();
+      await driver.start([
+        '--packages',
+        path.join(testDir, '_packages'),
+        path.join(testDir, 'sdk_ext_user.dart')
+      ]);
 
       DartSdk sdk = driver.sdk;
       expect(sdk, new isInstanceOf<FolderBasedDartSdk>());
diff --git a/pkg/analyzer_cli/test/super_mixin_test.dart b/pkg/analyzer_cli/test/super_mixin_test.dart
index f890289..de1ad1a 100644
--- a/pkg/analyzer_cli/test/super_mixin_test.dart
+++ b/pkg/analyzer_cli/test/super_mixin_test.dart
@@ -38,7 +38,7 @@
 
     test('produces errors when option absent', () async {
       var testPath = path.join(testDirectory, 'data/super_mixin_example.dart');
-      new Driver().start([testPath]);
+      await new Driver().start([testPath]);
 
       expect(exitCode, 3);
       var stdout = outSink.toString();
@@ -56,7 +56,7 @@
 
     test('produces no errors when option present', () async {
       var testPath = path.join(testDirectory, 'data/super_mixin_example.dart');
-      new Driver().start(['--supermixin', testPath]);
+      await new Driver().start(['--supermixin', testPath]);
 
       expect(exitCode, 0);
       var stdout = outSink.toString();
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
index a33f1fd..73e22cd 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -262,6 +262,10 @@
   /// Returns true if this element needs reflection information at runtime.
   bool isAccessibleByReflection(Element element) => true;
 
+  /// Returns true if this member element needs reflection information at
+  /// runtime.
+  bool isMemberAccessibleByReflection(MemberElement element) => true;
+
   /// Returns true if this element is covered by a mirrorsUsed annotation.
   ///
   /// Note that it might still be ok to tree shake the element away if no
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 1e2fc08..795b81c 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -134,7 +134,7 @@
   ResolvedUriTranslator get resolvedUriTranslator;
 
   LibraryElement mainApp;
-  FunctionElement mainFunction;
+  MethodElement mainFunction;
 
   DiagnosticReporter get reporter => _reporter;
   CommonElements get commonElements => _commonElements;
@@ -230,11 +230,6 @@
     }
     enqueuer = backend.makeEnqueuer();
 
-    if (options.dumpInfo && options.useStartupEmitter) {
-      throw new ArgumentError(
-          '--dump-info is not supported with the fast startup emitter');
-    }
-
     tasks = [
       dietParser = new DietParserTask(idGenerator, backend, reporter, measurer),
       scanner = createScannerTask(),
@@ -1175,8 +1170,8 @@
   ClassElement get functionClass =>
       _functionClass ??= _findRequired(coreLibrary, 'Function');
 
-  Element _functionApplyMethod;
-  Element get functionApplyMethod {
+  MethodElement _functionApplyMethod;
+  MethodElement get functionApplyMethod {
     if (_functionApplyMethod == null) {
       functionClass.ensureResolved(resolution);
       _functionApplyMethod = functionClass.lookupLocalMember('apply');
@@ -1186,7 +1181,7 @@
     return _functionApplyMethod;
   }
 
-  bool isFunctionApplyMethod(Element element) =>
+  bool isFunctionApplyMethod(MemberElement element) =>
       element.name == 'apply' && element.enclosingClass == functionClass;
 
   ClassElement _nullClass;
@@ -1234,8 +1229,8 @@
   ClassElement get resourceClass =>
       _resourceClass ??= _findRequired(coreLibrary, 'Resource');
 
-  Element _identicalFunction;
-  Element get identicalFunction =>
+  MethodElement _identicalFunction;
+  MethodElement get identicalFunction =>
       _identicalFunction ??= coreLibrary.find('identical');
 
   // From dart:async
@@ -1259,7 +1254,7 @@
       _mirrorSystemClass ??= _findRequired(mirrorsLibrary, 'MirrorSystem');
 
   FunctionElement _mirrorSystemGetNameFunction;
-  bool isMirrorSystemGetNameFunction(Element element) {
+  bool isMirrorSystemGetNameFunction(MemberElement element) {
     if (_mirrorSystemGetNameFunction == null) {
       if (!element.isFunction || mirrorsLibrary == null) return false;
       ClassElement cls = mirrorSystemClass;
@@ -1484,15 +1479,15 @@
 
   // TODO(johnniwinther): Change types to `ClassElement` when these are not
   // called with unrelated elements.
-  bool isNumberOrStringSupertype(/*Class*/ Element element) {
+  bool isNumberOrStringSupertype(/*Class*/ Entity element) {
     return element == coreLibrary.find('Comparable');
   }
 
-  bool isStringOnlySupertype(/*Class*/ Element element) {
+  bool isStringOnlySupertype(/*Class*/ Entity element) {
     return element == coreLibrary.find('Pattern');
   }
 
-  bool isListSupertype(/*Class*/ Element element) => element == iterableClass;
+  bool isListSupertype(/*Class*/ Entity element) => element == iterableClass;
 }
 
 class CompilerDiagnosticReporter extends DiagnosticReporter {
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 2a5b434..ed2143d 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -236,7 +236,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.boolType;
 }
 
@@ -272,7 +272,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.intType;
 }
 
@@ -308,7 +308,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.doubleType;
 }
 
@@ -344,7 +344,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.stringType;
 }
 
@@ -378,7 +378,7 @@
   bool _equals(NullConstantExpression other) => true;
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.nullType;
 }
 
@@ -695,7 +695,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.stringType;
 
   @override
@@ -736,7 +736,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.symbolType;
 }
 
@@ -775,7 +775,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.typeType;
 }
 
@@ -843,7 +843,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.functionType;
 }
 
@@ -894,7 +894,7 @@
         left.apply(arguments), operator, right.apply(arguments));
   }
 
-  ResolutionDartType getKnownType(CommonElements commonElements) {
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) {
     ResolutionDartType knownLeftType = left.getKnownType(commonElements);
     ResolutionDartType knownRightType = right.getKnownType(commonElements);
     switch (operator.kind) {
@@ -1036,7 +1036,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.boolType;
 
   @override
@@ -1155,7 +1155,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.intType;
 
   @override
@@ -1408,7 +1408,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.boolType;
 }
 
@@ -1474,7 +1474,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.intType;
 }
 
@@ -1536,7 +1536,7 @@
   }
 
   @override
-  ResolutionDartType getKnownType(CommonElements commonElements) =>
+  ResolutionInterfaceType getKnownType(CommonElements commonElements) =>
       commonElements.stringType;
 }
 
diff --git a/pkg/compiler/lib/src/core_types.dart b/pkg/compiler/lib/src/core_types.dart
index 8b34bdb..3108c1a 100644
--- a/pkg/compiler/lib/src/core_types.dart
+++ b/pkg/compiler/lib/src/core_types.dart
@@ -5,211 +5,205 @@
 // TODO(sigmund): rename and move to common/elements.dart
 library dart2js.type_system;
 
-import 'elements/resolution_types.dart';
-import 'elements/elements.dart'
-    show
-        ClassElement,
-        ConstructorElement,
-        FunctionElement,
-        LibraryElement,
-        Element;
+import 'elements/types.dart';
+import 'elements/entities.dart';
+import 'elements/elements.dart' show Entity;
 
 /// The common elements and types in Dart.
 abstract class CommonElements {
   /// The `Object` class defined in 'dart:core'.
-  ClassElement get objectClass;
+  ClassEntity get objectClass;
 
   /// The `bool` class defined in 'dart:core'.
-  ClassElement get boolClass;
+  ClassEntity get boolClass;
 
   /// The `num` class defined in 'dart:core'.
-  ClassElement get numClass;
+  ClassEntity get numClass;
 
   /// The `int` class defined in 'dart:core'.
-  ClassElement get intClass;
+  ClassEntity get intClass;
 
   /// The `double` class defined in 'dart:core'.
-  ClassElement get doubleClass;
+  ClassEntity get doubleClass;
 
   /// The `Resource` class defined in 'dart:core'.
-  ClassElement get resourceClass;
+  ClassEntity get resourceClass;
 
   /// The `String` class defined in 'dart:core'.
-  ClassElement get stringClass;
+  ClassEntity get stringClass;
 
   /// The `Symbol` class defined in 'dart:core'.
-  ClassElement get symbolClass;
+  ClassEntity get symbolClass;
 
   /// The `Function` class defined in 'dart:core'.
-  ClassElement get functionClass;
+  ClassEntity get functionClass;
 
   /// The `Null` class defined in 'dart:core'.
-  ClassElement get nullClass;
+  ClassEntity get nullClass;
 
   /// The `Type` class defined in 'dart:core'.
-  ClassElement get typeClass;
+  ClassEntity get typeClass;
 
   /// The `StackTrace` class defined in 'dart:core';
-  ClassElement get stackTraceClass;
+  ClassEntity get stackTraceClass;
 
   /// The `List` class defined in 'dart:core';
-  ClassElement get listClass;
+  ClassEntity get listClass;
 
   /// The `Map` class defined in 'dart:core';
-  ClassElement get mapClass;
+  ClassEntity get mapClass;
 
   /// The `Iterable` class defined in 'dart:core';
-  ClassElement get iterableClass;
+  ClassEntity get iterableClass;
 
   /// The `Future` class defined in 'async';.
-  ClassElement get futureClass;
+  ClassEntity get futureClass;
 
   /// The `Stream` class defined in 'async';
-  ClassElement get streamClass;
+  ClassEntity get streamClass;
 
   /// The dart:core library.
-  LibraryElement get coreLibrary;
+  LibraryEntity get coreLibrary;
 
   /// The dart:async library.
-  LibraryElement get asyncLibrary;
+  LibraryEntity get asyncLibrary;
 
   /// The dart:mirrors library. Null if the program doesn't access dart:mirrors.
-  LibraryElement get mirrorsLibrary;
+  LibraryEntity get mirrorsLibrary;
 
   /// The dart:typed_data library.
-  LibraryElement get typedDataLibrary;
+  LibraryEntity get typedDataLibrary;
 
   /// The `NativeTypedData` class from dart:typed_data.
-  ClassElement get typedDataClass;
+  ClassEntity get typedDataClass;
 
   // TODO(johnniwinther): Move this to the JavaScriptBackend.
   /// The class for patch annotation defined in dart:_js_helper.
-  ClassElement get patchAnnotationClass;
+  ClassEntity get patchAnnotationClass;
 
   // TODO(johnniwinther): Move this to the JavaScriptBackend.
-  ClassElement get nativeAnnotationClass;
+  ClassEntity get nativeAnnotationClass;
 
   /// Constructor of the `Symbol` class. This getter will ensure that `Symbol`
   /// is resolved and lookup the constructor on demand.
-  ConstructorElement get symbolConstructor;
+  FunctionEntity get symbolConstructor;
 
   /// Whether [element] is the same as [symbolConstructor]. Used to check
   /// for the constructor without computing it until it is likely to be seen.
-  bool isSymbolConstructor(Element e);
+  bool isSymbolConstructor(Entity e);
 
   /// The `MirrorSystem` class in dart:mirrors.
-  ClassElement get mirrorSystemClass;
+  ClassEntity get mirrorSystemClass;
 
   /// Whether [element] is `MirrorClass.getName`. Used to check for the use of
   /// that static method without forcing the resolution of the `MirrorSystem`
   /// class until it is necessary.
-  bool isMirrorSystemGetNameFunction(Element element);
+  bool isMirrorSystemGetNameFunction(MemberEntity element);
 
   /// The `MirrorsUsed` annotation in dart:mirrors.
-  ClassElement get mirrorsUsedClass;
+  ClassEntity get mirrorsUsedClass;
 
   /// Whether [element] is the constructor of the `MirrorsUsed` class. Used to
   /// check for the constructor without forcing the resolution of the
   /// `MirrorsUsed` class until it is necessary.
-  bool isMirrorsUsedConstructor(ConstructorElement element);
+  bool isMirrorsUsedConstructor(FunctionEntity element);
 
   /// The `DeferredLibrary` annotation in dart:async that was used before the
   /// deferred import syntax was introduced.
   // TODO(sigmund): drop support for this old syntax?
-  ClassElement get deferredLibraryClass;
+  ClassEntity get deferredLibraryClass;
 
   /// The function `identical` in dart:core.
-  FunctionElement get identicalFunction;
+  FunctionEntity get identicalFunction;
 
   /// The method `Function.apply`.
-  FunctionElement get functionApplyMethod;
+  FunctionEntity get functionApplyMethod;
 
   /// Whether [element] is the same as [functionApplyMethod]. This will not
   /// resolve the apply method if it hasn't been seen yet during compilation.
-  bool isFunctionApplyMethod(Element element);
+  bool isFunctionApplyMethod(MemberEntity element);
 
   /// The unnamed constructor of `List`.
-  ConstructorElement get unnamedListConstructor;
+  FunctionEntity get unnamedListConstructor;
 
   /// The 'filled' constructor of `List`.
-  ConstructorElement get filledListConstructor;
+  FunctionEntity get filledListConstructor;
 
   /// The `dynamic` type.
-  ResolutionDynamicType get dynamicType;
+  DynamicType get dynamicType;
 
   /// The `Object` type defined in 'dart:core'.
-  ResolutionInterfaceType get objectType;
+  InterfaceType get objectType;
 
   /// The `bool` type defined in 'dart:core'.
-  ResolutionInterfaceType get boolType;
+  InterfaceType get boolType;
 
   /// The `num` type defined in 'dart:core'.
-  ResolutionInterfaceType get numType;
+  InterfaceType get numType;
 
   /// The `int` type defined in 'dart:core'.
-  ResolutionInterfaceType get intType;
+  InterfaceType get intType;
 
   /// The `double` type defined in 'dart:core'.
-  ResolutionInterfaceType get doubleType;
+  InterfaceType get doubleType;
 
   /// The `Resource` type defined in 'dart:core'.
-  ResolutionInterfaceType get resourceType;
+  InterfaceType get resourceType;
 
   /// The `String` type defined in 'dart:core'.
-  ResolutionInterfaceType get stringType;
+  InterfaceType get stringType;
 
   /// The `Symbol` type defined in 'dart:core'.
-  ResolutionInterfaceType get symbolType;
+  InterfaceType get symbolType;
 
   /// The `Function` type defined in 'dart:core'.
-  ResolutionInterfaceType get functionType;
+  InterfaceType get functionType;
 
   /// The `Null` type defined in 'dart:core'.
-  ResolutionInterfaceType get nullType;
+  InterfaceType get nullType;
 
   /// The `Type` type defined in 'dart:core'.
-  ResolutionInterfaceType get typeType;
+  InterfaceType get typeType;
 
   /// The `StackTrace` type defined in 'dart:core';
-  ResolutionInterfaceType get stackTraceType;
+  InterfaceType get stackTraceType;
 
   /// Returns an instance of the `List` type defined in 'dart:core' with
   /// [elementType] as its type argument.
   ///
   /// If no type argument is provided, the canonical raw type is returned.
-  ResolutionInterfaceType listType([ResolutionDartType elementType]);
+  InterfaceType listType([DartType elementType]);
 
   /// Returns an instance of the `Map` type defined in 'dart:core' with
   /// [keyType] and [valueType] as its type arguments.
   ///
   /// If no type arguments are provided, the canonical raw type is returned.
-  ResolutionInterfaceType mapType(
-      [ResolutionDartType keyType, ResolutionDartType valueType]);
+  InterfaceType mapType([DartType keyType, DartType valueType]);
 
   /// Returns an instance of the `Iterable` type defined in 'dart:core' with
   /// [elementType] as its type argument.
   ///
   /// If no type argument is provided, the canonical raw type is returned.
-  ResolutionInterfaceType iterableType([ResolutionDartType elementType]);
+  InterfaceType iterableType([DartType elementType]);
 
   /// Returns an instance of the `Future` type defined in 'dart:async' with
   /// [elementType] as its type argument.
   ///
   /// If no type argument is provided, the canonical raw type is returned.
-  ResolutionInterfaceType futureType([ResolutionDartType elementType]);
+  InterfaceType futureType([DartType elementType]);
 
   /// Returns an instance of the `Stream` type defined in 'dart:async' with
   /// [elementType] as its type argument.
   ///
   /// If no type argument is provided, the canonical raw type is returned.
-  ResolutionInterfaceType streamType([ResolutionDartType elementType]);
+  InterfaceType streamType([DartType elementType]);
 
   /// Returns `true` if [element] is a superclass of `String` or `num`.
-  bool isNumberOrStringSupertype(ClassElement element);
+  bool isNumberOrStringSupertype(ClassEntity element);
 
   /// Returns `true` if [element] is a superclass of `String`.
-  bool isStringOnlySupertype(ClassElement element);
+  bool isStringOnlySupertype(ClassEntity element);
 
   /// Returns `true` if [element] is a superclass of `List`.
-  bool isListSupertype(ClassElement element);
+  bool isListSupertype(ClassEntity element);
 }
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index fcf1293..bcb5627 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -329,10 +329,9 @@
       // Dump-info currently only works with the full emitter. If another
       // emitter is used it will fail here.
       JavaScriptBackend backend = compiler.backend;
-      full.Emitter emitter = backend.emitter.emitter;
       assert(outputUnit.name != null || outputUnit.isMainOutput);
       OutputUnitInfo info = new OutputUnitInfo(
-          outputUnit.name, emitter.outputBuffers[outputUnit].length);
+          outputUnit.name, backend.emitter.emitter.generatedSize(outputUnit));
       info.imports.addAll(outputUnit.imports
           .map((d) => compiler.deferredLoadTask.importDeferName[d]));
       result.outputUnits.add(info);
@@ -392,8 +391,8 @@
   // is called.
   final Set<jsAst.Node> _tracking = new Set<jsAst.Node>();
   // A mapping from Dart Elements to Javascript AST Nodes.
-  final Map<Element, List<jsAst.Node>> _elementToNodes =
-      <Element, List<jsAst.Node>>{};
+  final Map<Entity, List<jsAst.Node>> _elementToNodes =
+      <Entity, List<jsAst.Node>>{};
   final Map<ConstantValue, jsAst.Node> _constantToNode =
       <ConstantValue, jsAst.Node>{};
   // A mapping from Javascript AST Nodes to the size of their
@@ -474,7 +473,7 @@
 
   // Registers that a javascript AST node `code` was produced by the
   // dart Element `element`.
-  void registerElementAst(Element element, jsAst.Node code) {
+  void registerElementAst(Entity element, jsAst.Node code) {
     if (compiler.options.dumpInfo) {
       _elementToNodes
           .putIfAbsent(element, () => new List<jsAst.Node>())
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index ddc8ddd..167582f 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -142,7 +142,7 @@
   Element get outermostEnclosingMemberOrTopLevel {
     // TODO(lrn): Why is this called "Outermost"?
     // TODO(johnniwinther): Clean up this method: This method does not return
-    // the outermost for elements in closure classses, but some call-sites rely
+    // the outermost for elements in closure classes, but some call-sites rely
     // on that behavior.
     for (Element e = this; e != null; e = e.enclosingElement) {
       if (e.isClassMember || e.isTopLevel) {
diff --git a/pkg/compiler/lib/src/elements/entities.dart b/pkg/compiler/lib/src/elements/entities.dart
index df0abbe..6fd1f50 100644
--- a/pkg/compiler/lib/src/elements/entities.dart
+++ b/pkg/compiler/lib/src/elements/entities.dart
@@ -33,6 +33,9 @@
 /// Currently only [MemberElement] but later also kernel based Dart members
 /// and/or Dart-in-JS properties.
 abstract class MemberEntity extends Entity {
+  bool get isTopLevel;
+  bool get isStatic;
+  bool get isInstanceMember;
   bool get isConstructor;
   bool get isField;
   bool get isFunction;
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 6ff57cc..7f887ac 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2414,6 +2414,51 @@
     functionSignature = constructor.functionSignature;
   }
 
+  /// Returns the constructor body associated with the given constructor or
+  /// creates a new constructor body, if none can be found.
+  ///
+  /// Returns `null` if the constructor does not have a body.
+  static ConstructorBodyElementX createFromResolvedAst(
+      ResolvedAst constructorResolvedAst) {
+    ConstructorElement constructor =
+        constructorResolvedAst.element.implementation;
+    assert(constructor.isGenerativeConstructor);
+    if (constructorResolvedAst.kind != ResolvedAstKind.PARSED) return null;
+
+    FunctionExpression node = constructorResolvedAst.node;
+    // If we know the body doesn't have any code, we don't generate it.
+    if (!node.hasBody) return null;
+    if (node.hasEmptyBody) return null;
+    ClassElement classElement = constructor.enclosingClass;
+    ConstructorBodyElement bodyElement;
+    classElement.forEachBackendMember((Element backendMember) {
+      if (backendMember.isGenerativeConstructorBody) {
+        ConstructorBodyElement body = backendMember;
+        if (body.constructor == constructor) {
+          // TODO(kasperl): Find a way of stopping the iteration
+          // through the backend members.
+          bodyElement = backendMember;
+        }
+      }
+    });
+    if (bodyElement == null) {
+      bodyElement =
+          new ConstructorBodyElementX(constructorResolvedAst, constructor);
+      classElement.addBackendMember(bodyElement);
+
+      if (constructor.isPatch) {
+        // Create origin body element for patched constructors.
+        ConstructorBodyElementX patch = bodyElement;
+        ConstructorBodyElementX origin = new ConstructorBodyElementX(
+            constructorResolvedAst, constructor.origin);
+        origin.applyPatch(patch);
+        classElement.origin.addBackendMember(bodyElement.origin);
+      }
+    }
+    assert(bodyElement.isGenerativeConstructorBody);
+    return bodyElement;
+  }
+
   bool get hasNode => _resolvedAst.kind == ResolvedAstKind.PARSED;
 
   FunctionExpression get node => _resolvedAst.node;
diff --git a/pkg/compiler/lib/src/elements/resolution_types.dart b/pkg/compiler/lib/src/elements/resolution_types.dart
index 19fd8c8..b8ed4fb 100644
--- a/pkg/compiler/lib/src/elements/resolution_types.dart
+++ b/pkg/compiler/lib/src/elements/resolution_types.dart
@@ -787,8 +787,6 @@
 
   String get name => 'Function';
 
-  int computeArity() => parameterTypes.length;
-
   @override
   ResolutionDartType get dynamifyMethodTypeVariableType {
     if (!containsMethodTypeVariableType) return this;
@@ -1669,7 +1667,8 @@
   ResolutionDartType computeLeastUpperBoundFunctionTypes(
       ResolutionFunctionType a, ResolutionFunctionType b) {
     if (a.parameterTypes.length != b.parameterTypes.length) {
-      return commonElements.functionType;
+      ResolutionInterfaceType functionType = commonElements.functionType;
+      return functionType;
     }
     ResolutionDartType returnType =
         computeLeastUpperBound(a.returnType, b.returnType);
@@ -1751,10 +1750,12 @@
     }
 
     if (a.isFunctionType) {
-      a = commonElements.functionType;
+      ResolutionInterfaceType functionType = commonElements.functionType;
+      a = functionType;
     }
     if (b.isFunctionType) {
-      b = commonElements.functionType;
+      ResolutionInterfaceType functionType = commonElements.functionType;
+      b = functionType;
     }
 
     if (a.isInterfaceType && b.isInterfaceType) {
@@ -1797,7 +1798,9 @@
       ResolutionTypeVariableType variable = type;
       type = variable.element.bound;
       if (type == originalType) {
-        type = resolution.commonElements.objectType;
+        ResolutionInterfaceType objectType =
+            resolution.commonElements.objectType;
+        type = objectType;
       }
     }
     if (type.isMalformed) {
@@ -1841,7 +1844,9 @@
       return null;
     }
     if (type.isFunctionType) {
-      type = resolution.commonElements.functionType;
+      ResolutionInterfaceType functionType =
+          resolution.commonElements.functionType;
+      type = functionType;
     }
     assert(invariant(NO_LOCATION_SPANNABLE, type.isInterfaceType,
         message: "unexpected type kind ${type.kind}."));
diff --git a/pkg/compiler/lib/src/inferrer/builder.dart b/pkg/compiler/lib/src/inferrer/builder.dart
index add6bab..526357dd 100644
--- a/pkg/compiler/lib/src/inferrer/builder.dart
+++ b/pkg/compiler/lib/src/inferrer/builder.dart
@@ -11,7 +11,8 @@
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../constants/values.dart' show ConstantValue, IntConstantValue;
-import '../elements/resolution_types.dart' show ResolutionDartType;
+import '../elements/resolution_types.dart'
+    show ResolutionDartType, ResolutionInterfaceType;
 import '../elements/elements.dart';
 import '../js_backend/backend_helpers.dart';
 import '../js_backend/js_backend.dart' as js;
@@ -403,7 +404,8 @@
           }
         } else {
           // Narrow the elements to a non-null type.
-          ResolutionDartType objectType = closedWorld.commonElements.objectType;
+          ResolutionInterfaceType objectType =
+              closedWorld.commonElements.objectType;
           if (Elements.isLocal(receiverElement)) {
             narrow(receiverElement, objectType, node);
           }
@@ -2031,8 +2033,8 @@
     ClassElement cls = outermostElement.enclosingClass;
     MethodElement element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
     if (!Selectors.noSuchMethod_.signatureApplies(element)) {
-      element = compiler.commonElements.objectClass
-          .lookupMember(Identifiers.noSuchMethod_);
+      ClassElement objectClass = compiler.commonElements.objectClass;
+      element = objectClass.lookupMember(Identifiers.noSuchMethod_);
     }
     return handleStaticSend(node, selector, mask, element, arguments);
   }
@@ -2886,7 +2888,7 @@
     ast.Node identifier = node.declaredIdentifier;
     Element element = elements.getForInVariable(node);
     Selector selector = elements.getSelector(identifier);
-    TypeMask mask = inTreeData.typeOfSend(identifier);
+    TypeMask mask = inTreeData.typeOfSend(identifier.asSend());
 
     TypeInformation receiverType;
     if (element != null && element.isInstanceMember) {
diff --git a/pkg/compiler/lib/src/inferrer/closure_tracer.dart b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
index 0d00722..cd76db6 100644
--- a/pkg/compiler/lib/src/inferrer/closure_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
@@ -100,8 +100,10 @@
   bool _checkIfCurrentUser(element) =>
       inferrer.types.getInferredTypeOf(element) == currentUser;
 
-  bool _checkIfFunctionApply(element) =>
-      compiler.commonElements.isFunctionApplyMethod(element);
+  bool _checkIfFunctionApply(Element element) {
+    return element is MemberElement &&
+        compiler.commonElements.isFunctionApplyMethod(element);
+  }
 
   @override
   visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) {
diff --git a/pkg/compiler/lib/src/io/code_output.dart b/pkg/compiler/lib/src/io/code_output.dart
index e43cbbb..674bef3 100644
--- a/pkg/compiler/lib/src/io/code_output.dart
+++ b/pkg/compiler/lib/src/io/code_output.dart
@@ -39,7 +39,7 @@
   /// If the output is closed, a [StateError] is thrown.
   void addBuffer(CodeBuffer buffer);
 
-  /// Returns the number of characters currently write to this output.
+  /// Returns the number of characters currently written to this output.
   int get length;
 
   /// Returns `true` if this output has been closed.
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index a316930..17e8397 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -520,11 +520,17 @@
 
   @override
   void onStep(js.Node node, Offset offset, StepKind kind) {
-    SourceInformation sourceInformation = computeSourceInformation(node);
-    if (sourceInformation == null) return;
     int codeLocation = offset.value;
     if (codeLocation == null) return;
 
+    if (kind == StepKind.NO_INFO) {
+      sourceMapper.register(node, codeLocation, const NoSourceLocationMarker());
+      return;
+    }
+
+    SourceInformation sourceInformation = computeSourceInformation(node);
+    if (sourceInformation == null) return;
+
     void registerPosition(SourcePositionKind sourcePositionKind) {
       SourceLocation sourceLocation =
           getSourceLocation(sourceInformation, sourcePositionKind);
@@ -562,6 +568,8 @@
       case StepKind.SWITCH_EXPRESSION:
         registerPosition(SourcePositionKind.START);
         break;
+      case StepKind.NO_INFO:
+        break;
     }
   }
 }
@@ -710,6 +718,7 @@
   WHILE_CONDITION,
   DO_CONDITION,
   SWITCH_EXPRESSION,
+  NO_INFO,
 }
 
 /// Listener for the [JavaScriptTracer].
@@ -775,14 +784,20 @@
     }
   }
 
-  void notifyStep(js.Node node, Offset offset, StepKind kind) {
-    if (active) {
+  void notifyStep(js.Node node, Offset offset, StepKind kind,
+      {bool force: false}) {
+    if (active || force) {
       listeners.forEach((listener) => listener.onStep(node, offset, kind));
     }
   }
 
   void apply(js.Node node) {
     notifyStart(node);
+
+    int startPosition = getSyntaxOffset(node, kind: CodePositionKind.START);
+    Offset startOffset = getOffsetForNode(node, startPosition);
+    notifyStep(node, startOffset, StepKind.NO_INFO, force: true);
+
     node.accept(this);
     notifyEnd(node);
   }
@@ -829,6 +844,11 @@
         statementOffset = getSyntaxOffset(node, kind: CodePositionKind.CLOSING);
     Offset exitOffset = getOffsetForNode(node, statementOffset);
     notifyStep(node, exitOffset, StepKind.FUN_EXIT);
+    if (active && !activeBefore) {
+      int endPosition = getSyntaxOffset(node, kind: CodePositionKind.END);
+      Offset endOffset = getOffsetForNode(node, endPosition);
+      notifyStep(node, endOffset, StepKind.NO_INFO);
+    }
     active = activeBefore;
   }
 
diff --git a/pkg/compiler/lib/src/io/source_information.dart b/pkg/compiler/lib/src/io/source_information.dart
index a84d8bf..2b01ba1 100644
--- a/pkg/compiler/lib/src/io/source_information.dart
+++ b/pkg/compiler/lib/src/io/source_information.dart
@@ -154,35 +154,25 @@
 
 /// A location in a source file.
 abstract class SourceLocation {
-  final SourceFile _sourceFile;
-  int _line;
-
-  SourceLocation(this._sourceFile) {
-    assert(invariant(new SourceSpan(sourceUri, 0, 0), isValid,
-        message: "Invalid source location in ${sourceUri}: "
-            "offset=$offset, length=${_sourceFile.length}."));
-  }
+  const SourceLocation();
 
   /// The absolute URI of the source file of this source location.
-  Uri get sourceUri => _sourceFile.uri;
+  Uri get sourceUri;
 
   /// The character offset of the this source location into the source file.
   int get offset;
 
   /// The 0-based line number of the [offset].
-  int get line {
-    if (_line == null) _line = _sourceFile.getLine(offset);
-    return _line;
-  }
+  int get line;
 
   /// The 0-base column number of the [offset] with its line.
-  int get column => _sourceFile.getColumn(line, offset);
+  int get column;
 
   /// The name associated with this source location, if any.
   String get sourceName;
 
   /// `true` if the offset within the length of the source file.
-  bool get isValid => offset < _sourceFile.length;
+  bool get isValid;
 
   int get hashCode {
     return sourceUri.hashCode * 17 +
@@ -209,7 +199,50 @@
   }
 }
 
-class OffsetSourceLocation extends SourceLocation {
+/// A location in a source file.
+abstract class AbstractSourceLocation extends SourceLocation {
+  final SourceFile _sourceFile;
+  int _line;
+
+  AbstractSourceLocation(this._sourceFile) {
+    assert(invariant(new SourceSpan(sourceUri, 0, 0), isValid,
+        message: "Invalid source location in ${sourceUri}: "
+            "offset=$offset, length=${_sourceFile.length}."));
+  }
+
+  /// The absolute URI of the source file of this source location.
+  Uri get sourceUri => _sourceFile.uri;
+
+  /// The character offset of the this source location into the source file.
+  int get offset;
+
+  /// The 0-based line number of the [offset].
+  int get line {
+    if (_line == null) _line = _sourceFile.getLine(offset);
+    return _line;
+  }
+
+  /// The 0-base column number of the [offset] with its line.
+  int get column => _sourceFile.getColumn(line, offset);
+
+  /// The name associated with this source location, if any.
+  String get sourceName;
+
+  /// `true` if the offset within the length of the source file.
+  bool get isValid => offset < _sourceFile.length;
+
+  String get shortText {
+    // Use 1-based line/column info to match usual dart tool output.
+    return '${sourceUri.pathSegments.last}:[${line + 1},${column + 1}]';
+  }
+
+  String toString() {
+    // Use 1-based line/column info to match usual dart tool output.
+    return '${sourceUri}:[${line + 1},${column + 1}]';
+  }
+}
+
+class OffsetSourceLocation extends AbstractSourceLocation {
   final int offset;
   final String sourceName;
 
@@ -282,3 +315,29 @@
   }
   return sourceFile;
 }
+
+class NoSourceLocationMarker extends SourceLocation {
+  const NoSourceLocationMarker();
+
+  @override
+  Uri get sourceUri => null;
+
+  @override
+  bool get isValid => true;
+
+  @override
+  String get sourceName => null;
+
+  @override
+  int get column => null;
+
+  @override
+  int get line => null;
+
+  @override
+  int get offset => null;
+
+  String get shortName => '<no-location>';
+
+  String toString() => '<no-location>';
+}
diff --git a/pkg/compiler/lib/src/io/source_map_builder.dart b/pkg/compiler/lib/src/io/source_map_builder.dart
index c3e6f5f..e7c12aa 100644
--- a/pkg/compiler/lib/src/io/source_map_builder.dart
+++ b/pkg/compiler/lib/src/io/source_map_builder.dart
@@ -52,10 +52,13 @@
 
       SourceLocation location = sourceMapEntry.sourceLocation;
       if (location != null) {
-        LineColumnMap<SourceMapEntry> sourceLineColumnMap =
-            sourceLocationMap.putIfAbsent(
-                location.sourceUri, () => new LineColumnMap<SourceMapEntry>());
-        sourceLineColumnMap.add(location.line, location.column, sourceMapEntry);
+        if (location.sourceUri != null) {
+          LineColumnMap<SourceMapEntry> sourceLineColumnMap =
+              sourceLocationMap.putIfAbsent(location.sourceUri,
+                  () => new LineColumnMap<SourceMapEntry>());
+          sourceLineColumnMap.add(
+              location.line, location.column, sourceMapEntry);
+        }
       }
     });
 
@@ -69,9 +72,11 @@
     lineColumnMap.forEachElement((SourceMapEntry entry) {
       SourceLocation sourceLocation = entry.sourceLocation;
       if (sourceLocation != null) {
-        uriMap.register(sourceLocation.sourceUri);
-        if (sourceLocation.sourceName != null) {
-          nameMap.register(sourceLocation.sourceName);
+        if (sourceLocation.sourceUri != null) {
+          uriMap.register(sourceLocation.sourceUri);
+          if (sourceLocation.sourceName != null) {
+            nameMap.register(sourceLocation.sourceName);
+          }
         }
       }
     });
@@ -143,9 +148,11 @@
       }
 
       Uri sourceUri = sourceLocation.sourceUri;
-      sourceUriIndexEncoder.encode(output, uriMap[sourceUri]);
-      sourceLineEncoder.encode(output, sourceLocation.line);
-      sourceColumnEncoder.encode(output, sourceLocation.column);
+      if (sourceUri != null) {
+        sourceUriIndexEncoder.encode(output, uriMap[sourceUri]);
+        sourceLineEncoder.encode(output, sourceLocation.line);
+        sourceColumnEncoder.encode(output, sourceLocation.column);
+      }
 
       String sourceName = sourceLocation.sourceName;
       if (sourceName != null) {
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 2aa4156..f5a2453 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -786,6 +786,12 @@
   @override
   bool isJsInterop(Element element) => nativeData.isJsInterop(element);
 
+  /// Returns `true` if [element] is a JsInterop class.
+  bool isJsInteropClass(ClassElement element) => isJsInterop(element);
+
+  /// Returns `true` if [element] is a JsInterop method.
+  bool isJsInteropMethod(MethodElement element) => isJsInterop(element);
+
   /// Whether [element] corresponds to a native JavaScript construct either
   /// through the native mechanism (`@Native(...)` or the `native` pseudo
   /// keyword) which is only allowed for internal libraries or via the typed
@@ -852,7 +858,7 @@
     return isNativeOrExtendsNative(element.superclass);
   }
 
-  bool isInterceptedMethod(Element element) {
+  bool isInterceptedMethod(MemberElement element) {
     if (!element.isInstanceMember) return false;
     if (element.isGenerativeConstructorBody) {
       return isNativeOrExtendsNative(element.enclosingClass);
@@ -975,7 +981,8 @@
       ClassElement interceptorClass) {
     if (interceptorClass == null) return;
     interceptorClass.ensureResolved(resolution);
-    commonElements.objectClass.forEachMember((_, Element member) {
+    ClassElement objectClass = commonElements.objectClass;
+    objectClass.forEachMember((_, Element member) {
       if (member.isGenerativeConstructor) return;
       Element interceptorMember = interceptorClass.lookupMember(member.name);
       // Interceptors must override all Object methods due to calling convention
@@ -1629,7 +1636,24 @@
       // type so we only need one check method.
       return 'checkMalformedType';
     }
-    Element element = type.element;
+
+    if (type.isVoid) {
+      assert(!typeCast); // Cannot cast to void.
+      if (nativeCheckOnly) return null;
+      return 'voidTypeCheck';
+    }
+
+    if (type.isTypeVariable) {
+      return typeCast
+          ? 'subtypeOfRuntimeTypeCast'
+          : 'assertSubtypeOfRuntimeType';
+    }
+
+    if (type.isFunctionType) return null;
+
+    assert(invariant(NO_LOCATION_SPANNABLE, type.isInterfaceType,
+        message: "Unexpected type: $type (${type.kind})"));
+    ClassElement element = type.element;
     bool nativeCheck =
         nativeCheckOnly || emitter.nativeEmitter.requiresNativeIsCheck(element);
 
@@ -1638,84 +1662,70 @@
     // that it can be optimized by standard interceptor optimizations.
     nativeCheck = true;
 
-    if (type.isVoid) {
-      assert(!typeCast); // Cannot cast to void.
-      if (nativeCheckOnly) return null;
-      return 'voidTypeCheck';
-    } else if (element == helpers.jsStringClass ||
+    var suffix = typeCast ? 'TypeCast' : 'TypeCheck';
+    if (element == helpers.jsStringClass ||
         element == commonElements.stringClass) {
       if (nativeCheckOnly) return null;
-      return typeCast ? 'stringTypeCast' : 'stringTypeCheck';
-    } else if (element == helpers.jsDoubleClass ||
+      return 'string$suffix';
+    }
+
+    if (element == helpers.jsDoubleClass ||
         element == commonElements.doubleClass) {
       if (nativeCheckOnly) return null;
-      return typeCast ? 'doubleTypeCast' : 'doubleTypeCheck';
-    } else if (element == helpers.jsNumberClass ||
+      return 'double$suffix';
+    }
+
+    if (element == helpers.jsNumberClass ||
         element == commonElements.numClass) {
       if (nativeCheckOnly) return null;
-      return typeCast ? 'numTypeCast' : 'numTypeCheck';
-    } else if (element == helpers.jsBoolClass ||
-        element == commonElements.boolClass) {
+      return 'num$suffix';
+    }
+
+    if (element == helpers.jsBoolClass || element == commonElements.boolClass) {
       if (nativeCheckOnly) return null;
-      return typeCast ? 'boolTypeCast' : 'boolTypeCheck';
-    } else if (element == helpers.jsIntClass ||
+      return 'bool$suffix';
+    }
+
+    if (element == helpers.jsIntClass ||
         element == commonElements.intClass ||
         element == helpers.jsUInt32Class ||
         element == helpers.jsUInt31Class ||
         element == helpers.jsPositiveIntClass) {
       if (nativeCheckOnly) return null;
-      return typeCast ? 'intTypeCast' : 'intTypeCheck';
-    } else if (commonElements.isNumberOrStringSupertype(element)) {
-      if (nativeCheck) {
-        return typeCast
-            ? 'numberOrStringSuperNativeTypeCast'
-            : 'numberOrStringSuperNativeTypeCheck';
-      } else {
-        return typeCast
-            ? 'numberOrStringSuperTypeCast'
-            : 'numberOrStringSuperTypeCheck';
-      }
-    } else if (commonElements.isStringOnlySupertype(element)) {
-      if (nativeCheck) {
-        return typeCast
-            ? 'stringSuperNativeTypeCast'
-            : 'stringSuperNativeTypeCheck';
-      } else {
-        return typeCast ? 'stringSuperTypeCast' : 'stringSuperTypeCheck';
-      }
-    } else if ((element == commonElements.listClass ||
+      return 'int$suffix';
+    }
+
+    if (commonElements.isNumberOrStringSupertype(element)) {
+      return nativeCheck
+          ? 'numberOrStringSuperNative$suffix'
+          : 'numberOrStringSuper$suffix';
+    }
+
+    if (commonElements.isStringOnlySupertype(element)) {
+      return nativeCheck ? 'stringSuperNative$suffix' : 'stringSuper$suffix';
+    }
+
+    if ((element == commonElements.listClass ||
             element == helpers.jsArrayClass) &&
         type.treatAsRaw) {
       if (nativeCheckOnly) return null;
-      return typeCast ? 'listTypeCast' : 'listTypeCheck';
+      return 'list$suffix';
+    }
+
+    if (commonElements.isListSupertype(element)) {
+      return nativeCheck ? 'listSuperNative$suffix' : 'listSuper$suffix';
+    }
+
+    if (type.isInterfaceType && !type.treatAsRaw) {
+      return typeCast ? 'subtypeCast' : 'assertSubtype';
+    }
+
+    if (nativeCheck) {
+      // TODO(karlklose): can we get rid of this branch when we use
+      // interceptors?
+      return 'intercepted$suffix';
     } else {
-      if (commonElements.isListSupertype(element)) {
-        if (nativeCheck) {
-          return typeCast
-              ? 'listSuperNativeTypeCast'
-              : 'listSuperNativeTypeCheck';
-        } else {
-          return typeCast ? 'listSuperTypeCast' : 'listSuperTypeCheck';
-        }
-      } else {
-        if (type.isInterfaceType && !type.treatAsRaw) {
-          return typeCast ? 'subtypeCast' : 'assertSubtype';
-        } else if (type.isTypeVariable) {
-          return typeCast
-              ? 'subtypeOfRuntimeTypeCast'
-              : 'assertSubtypeOfRuntimeType';
-        } else if (type.isFunctionType) {
-          return null;
-        } else {
-          if (nativeCheck) {
-            // TODO(karlklose): can we get rid of this branch when we use
-            // interceptors?
-            return typeCast ? 'interceptedTypeCast' : 'interceptedTypeCheck';
-          } else {
-            return typeCast ? 'propertyTypeCast' : 'propertyTypeCheck';
-          }
-        }
-      }
+      return 'property$suffix';
     }
   }
 
@@ -1982,6 +1992,10 @@
     return membersNeededForReflection.contains(element);
   }
 
+  bool isMemberAccessibleByReflection(MemberElement element) {
+    return membersNeededForReflection.contains(element);
+  }
+
   /**
    * Returns true if the element has to be resolved due to a mirrorsUsed
    * annotation. If we have insufficient mirrors used annotations, we only
@@ -2199,7 +2213,7 @@
         new jsAst.PropertyAccess(use2, dispatchProperty);
 
     List<jsAst.Expression> arguments = <jsAst.Expression>[use1, record];
-    FunctionElement helper = helpers.isJsIndexable;
+    MethodElement helper = helpers.isJsIndexable;
     jsAst.Expression helperExpression = emitter.staticFunctionAccess(helper);
     return new jsAst.Call(helperExpression, arguments);
   }
@@ -3062,6 +3076,7 @@
 
   void onIsCheckForCodegen(
       ResolutionDartType type, TransformedWorldImpact transformed) {
+    if (type.isDynamic) return;
     type = type.unaliased;
     registerBackendImpact(transformed, impacts.typeCheck);
 
diff --git a/pkg/compiler/lib/src/js_backend/backend_helpers.dart b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
index a4f814f..5c2834a 100644
--- a/pkg/compiler/lib/src/js_backend/backend_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
@@ -145,7 +145,7 @@
    */
   ClassElement jsIndexingBehaviorInterface;
 
-  Element getNativeInterceptorMethod;
+  MethodElement getNativeInterceptorMethod;
 
   /// Holds the method "getIsolateAffinityTag" when dart:_js_helper has been
   /// loaded.
@@ -217,8 +217,10 @@
     return element;
   }
 
-  Element findCoreHelper(String name) =>
-      compiler.commonElements.coreLibrary.implementation.localLookup(name);
+  Element findCoreHelper(String name) {
+    LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
+    return coreLibrary.implementation.localLookup(name);
+  }
 
   ConstructorElement _findConstructor(ClassElement cls, String name) {
     cls.ensureResolved(resolution);
@@ -356,7 +358,8 @@
 
     // [LinkedHashMap] is reexported from dart:collection and can therefore not
     // be loaded from dart:core in [onLibraryScanned].
-    mapLiteralClass = compiler.commonElements.coreLibrary.find('LinkedHashMap');
+    LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
+    mapLiteralClass = coreLibrary.find('LinkedHashMap');
     assert(invariant(
         compiler.commonElements.coreLibrary, mapLiteralClass != null,
         message: "Element 'LinkedHashMap' not found in 'dart:core'."));
@@ -395,7 +398,8 @@
     jsStringOperatorAdd = compiler.lookupElementIn(jsStringClass, '+');
     jsStringToString = compiler.lookupElementIn(jsStringClass, 'toString');
 
-    objectEquals = compiler.lookupElementIn(commonElements.objectClass, '==');
+    ClassElement objectClass = commonElements.objectClass;
+    objectEquals = compiler.lookupElementIn(objectClass, '==');
   }
 
   ConstructorElement _mapLiteralConstructor;
@@ -505,7 +509,7 @@
     return _findHelper('closureFromTearOff');
   }
 
-  Element get isJsIndexable {
+  MethodElement get isJsIndexable {
     return _findHelper('isJsIndexable');
   }
 
@@ -566,7 +570,7 @@
     return _findHelper('throwExpression');
   }
 
-  Element get closureConverter {
+  MethodElement get closureConverter {
     return _findHelper('convertDartClosureToJS');
   }
 
@@ -574,7 +578,7 @@
     return _findHelper('getTraceFromException');
   }
 
-  Element get setRuntimeTypeInfo {
+  MethodElement get setRuntimeTypeInfo {
     return _findHelper('setRuntimeTypeInfo');
   }
 
@@ -586,7 +590,7 @@
     return _findHelper('getTypeArgumentByIndex');
   }
 
-  Element get computeSignature {
+  MethodElement get computeSignature {
     return _findHelper('computeSignature');
   }
 
@@ -659,7 +663,7 @@
   Element _cachedCoreHelper(String name) =>
       _cachedCoreHelpers[name] ??= findCoreHelper(name);
 
-  Element get createRuntimeType {
+  MethodElement get createRuntimeType {
     return _findHelper('createRuntimeType');
   }
 
@@ -667,55 +671,55 @@
     return _findHelper("getFallThroughError");
   }
 
-  Element get createInvocationMirror {
+  MethodElement get createInvocationMirror {
     return _findHelper('createInvocationMirror');
   }
 
-  Element get cyclicThrowHelper {
+  MethodElement get cyclicThrowHelper {
     return _findHelper("throwCyclicInit");
   }
 
-  Element get asyncHelper {
+  MethodElement get asyncHelper {
     return _findAsyncHelper("_asyncHelper");
   }
 
-  Element get wrapBody {
+  MethodElement get wrapBody {
     return _findAsyncHelper("_wrapJsFunctionForAsync");
   }
 
-  Element get yieldStar {
+  MethodElement get yieldStar {
     ClassElement classElement = _findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(resolution);
     return classElement.lookupLocalMember("yieldStar");
   }
 
-  Element get yieldSingle {
+  MethodElement get yieldSingle {
     ClassElement classElement = _findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(resolution);
     return classElement.lookupLocalMember("yieldSingle");
   }
 
-  Element get syncStarUncaughtError {
+  MethodElement get syncStarUncaughtError {
     ClassElement classElement = _findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(resolution);
     return classElement.lookupLocalMember("uncaughtError");
   }
 
-  Element get asyncStarHelper {
+  MethodElement get asyncStarHelper {
     return _findAsyncHelper("_asyncStarHelper");
   }
 
-  Element get streamOfController {
+  MethodElement get streamOfController {
     return _findAsyncHelper("_streamOfController");
   }
 
-  Element get endOfIteration {
+  MethodElement get endOfIteration {
     ClassElement classElement = _findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(resolution);
     return classElement.lookupLocalMember("endOfIteration");
   }
 
-  Element get syncStarIterable {
+  ClassElement get syncStarIterable {
     ClassElement classElement = _findAsyncHelper("_SyncStarIterable");
     classElement.ensureResolved(resolution);
     return classElement;
@@ -727,36 +731,36 @@
     return classElement;
   }
 
-  Element get controllerStream {
+  ClassElement get controllerStream {
     ClassElement classElement = _findAsyncHelper("_ControllerStream");
     classElement.ensureResolved(resolution);
     return classElement;
   }
 
-  Element get syncStarIterableConstructor {
+  ConstructorElement get syncStarIterableConstructor {
     ClassElement classElement = syncStarIterable;
     classElement.ensureResolved(resolution);
     return classElement.lookupConstructor("");
   }
 
-  Element get syncCompleterConstructor {
+  ConstructorElement get syncCompleterConstructor {
     ClassElement classElement = _find(asyncLibrary, "Completer");
     classElement.ensureResolved(resolution);
     return classElement.lookupConstructor("sync");
   }
 
-  Element get asyncStarController {
+  ClassElement get asyncStarController {
     ClassElement classElement = _findAsyncHelper("_AsyncStarStreamController");
     classElement.ensureResolved(resolution);
     return classElement;
   }
 
-  Element get asyncStarControllerConstructor {
+  ConstructorElement get asyncStarControllerConstructor {
     ClassElement classElement = asyncStarController;
     return classElement.lookupConstructor("");
   }
 
-  Element get streamIteratorConstructor {
+  ConstructorElement get streamIteratorConstructor {
     ClassElement classElement = _find(asyncLibrary, "StreamIterator");
     classElement.ensureResolved(resolution);
     return classElement.lookupConstructor("");
@@ -819,7 +823,7 @@
     return _findHelper('defineProperty');
   }
 
-  Element get startRootIsolate {
+  MethodElement get startRootIsolate {
     return _find(isolateHelperLibrary, START_ROOT_ISOLATE);
   }
 
@@ -847,8 +851,9 @@
 
   MethodElement get objectNoSuchMethod {
     if (_objectNoSuchMethod == null) {
-      _objectNoSuchMethod = commonElements.objectClass
-          .lookupLocalMember(Identifiers.noSuchMethod_);
+      ClassElement objectClass = commonElements.objectClass;
+      _objectNoSuchMethod =
+          objectClass.lookupLocalMember(Identifiers.noSuchMethod_);
     }
     return _objectNoSuchMethod;
   }
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index f2df00d..97da9b7 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -176,7 +176,7 @@
                 helpers.unresolvedTopLevelMethodError,
                 helpers.unresolvedTopLevelGetterError,
                 helpers.unresolvedTopLevelSetterError,
-                commonElements.symbolConstructor.declaration,
+                commonElements.symbolConstructor,
               ]
             : [
                 helpers.throwNoSuchMethod,
@@ -295,7 +295,7 @@
   BackendImpact get constSymbol {
     return _constSymbol ??= new BackendImpact(
         instantiatedClasses: [commonElements.symbolClass],
-        staticUses: [commonElements.symbolConstructor.declaration]);
+        staticUses: [commonElements.symbolConstructor]);
   }
 
   /// Helper for registering that `int` is needed.
diff --git a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
index 818f82c..613abf9 100644
--- a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
@@ -22,8 +22,8 @@
     JavaScriptBackend backend = compiler.backend;
     // TODO(johnniwinther): Refactor this to avoid looking up directly in the
     // js helper library but instead access helpers directly on backend helpers.
-    return new StaticUse.staticInvoke(
-        backend.helpers.jsHelperLibrary.find(name), callStructure);
+    MethodElement method = backend.helpers.jsHelperLibrary.find(name);
+    return new StaticUse.staticInvoke(method, callStructure);
   }
 
   CallStructure get callStructure => CallStructure.ONE_ARG;
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index 054372f..32bffa9 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -263,7 +263,7 @@
 
   JavaScriptBackend get backend => compiler.backend;
 
-  jsAst.PropertyAccess getHelperProperty(Element helper) {
+  jsAst.PropertyAccess getHelperProperty(MethodElement helper) {
     return backend.emitter.staticFunctionAccess(helper);
   }
 
diff --git a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
index 0473fe6..4847928 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -118,7 +118,7 @@
 
   // TODO(johnniwinther): Move this to the backend constant handler.
   /** Caches the statics where the initial value cannot be eagerly compiled. */
-  final Set<VariableElement> lazyStatics = new Set<VariableElement>();
+  final Set<FieldElement> lazyStatics = new Set<FieldElement>();
 
   // Constants computed for constant expressions.
   final Map<Node, ConstantExpression> nodeConstantMap =
@@ -157,8 +157,8 @@
     compiledConstants.add(constant);
   }
 
-  List<VariableElement> getLazilyInitializedFieldsForEmission() {
-    return new List<VariableElement>.from(lazyStatics);
+  List<FieldElement> getLazilyInitializedFieldsForEmission() {
+    return new List<FieldElement>.from(lazyStatics);
   }
 
   /**
diff --git a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
index a89b86d..3a55345 100644
--- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
@@ -126,7 +126,7 @@
   bool needsClass(ClassElement classElement) =>
       codegenJoin.activeClasses.contains(classElement);
 
-  List<Element> constructors(ClassElement classElement) =>
+  List<ConstructorElement> constructors(ClassElement classElement) =>
       codegenJoin.computeEscapingConstructors(classElement);
 }
 
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 97ad11cc..ffb7800 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -636,11 +636,14 @@
       case JsGetName.IS_INDEXABLE_FIELD_NAME:
         return operatorIs(helpers.jsIndexingBehaviorInterface);
       case JsGetName.NULL_CLASS_TYPE_NAME:
-        return runtimeTypeName(commonElements.nullClass);
+        ClassElement nullClass = commonElements.nullClass;
+        return runtimeTypeName(nullClass);
       case JsGetName.OBJECT_CLASS_TYPE_NAME:
-        return runtimeTypeName(commonElements.objectClass);
+        ClassElement objectClass = commonElements.objectClass;
+        return runtimeTypeName(objectClass);
       case JsGetName.FUNCTION_CLASS_TYPE_NAME:
-        return runtimeTypeName(commonElements.functionClass);
+        ClassElement functionClass = commonElements.functionClass;
+        return runtimeTypeName(functionClass);
       default:
         reporter.reportErrorMessage(node, MessageKind.GENERIC,
             {'text': 'Error: Namer has no name for "$name".'});
@@ -776,10 +779,14 @@
   /// For example: fixedBackendPath for the static method createMap in the
   /// Map class of the goog.map JavaScript library would have path
   /// "goog.maps.Map".
-  String fixedBackendPath(Element element) {
+  String fixedBackendMethodPath(MethodElement element) {
+    return _fixedBackendPath(element);
+  }
+
+  String _fixedBackendPath(Element element) {
     if (!backend.isJsInterop(element)) return null;
     if (element.isInstanceMember) return 'this';
-    if (element.isConstructor) return fixedBackendPath(element.enclosingClass);
+    if (element.isConstructor) return _fixedBackendPath(element.enclosingClass);
     if (element.isLibrary) return 'self';
     var sb = new StringBuffer();
     sb..write(_jsNameHelper(element.library));
@@ -1497,9 +1504,19 @@
   }
 
   /// Returns [staticStateHolder] or one of [reservedGlobalObjectNames].
+  // TODO(johnniwinther): Verify that the implementation can be changed to
+  // `globalObjectForLibrary(element.library)`.
+  String globalObjectForMethod(MethodElement element) =>
+      globalObjectFor(element);
+
+  /// Returns [staticStateHolder] or one of [reservedGlobalObjectNames].
   String globalObjectFor(Element element) {
     if (_isPropertyOfStaticStateHolder(element)) return staticStateHolder;
-    LibraryElement library = element.library;
+    return globalObjectForLibrary(element.library);
+  }
+
+  /// Returns the [reservedGlobalObjectNames] for [library].
+  String globalObjectForLibrary(LibraryElement library) {
     if (library == helpers.interceptorsLibrary) return 'J';
     if (library.isInternalLibrary) return 'H';
     if (library.isPlatformLibrary) {
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index d8bb379..dfa0813 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -265,8 +265,8 @@
     // JSArray needs type arguments.
     // TODO(karlklose): make this dependency visible from code.
     if (backend.helpers.jsArrayClass != null) {
-      registerRtiDependency(
-          backend.helpers.jsArrayClass, compiler.commonElements.listClass);
+      ClassElement listClass = compiler.commonElements.listClass;
+      registerRtiDependency(backend.helpers.jsArrayClass, listClass);
     }
     // Compute the set of all classes and methods that need runtime type
     // information.
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 ae0ca07..06d08df 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -2,7 +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.
 
-part of dart2js.js_emitter;
+library dart2js.js_emitter.class_stub_generator;
+
+import '../common/names.dart' show Identifiers;
+import '../compiler.dart' show Compiler;
+import '../elements/entities.dart';
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/js_backend.dart' show JavaScriptBackend, Namer;
+import '../universe/selector.dart' show Selector;
+import '../universe/world_builder.dart'
+    show CodegenWorldBuilder, SelectorConstraints;
+import '../world.dart' show ClosedWorld;
+
+import 'model.dart';
 
 class ClassStubGenerator {
   final Namer namer;
@@ -15,8 +28,8 @@
       this.namer, this.backend, this.worldBuilder, this.closedWorld,
       {this.enableMinification});
 
-  jsAst.Expression generateClassConstructor(ClassElement classElement,
-      Iterable<jsAst.Name> fields, bool hasRtiField) {
+  jsAst.Expression generateClassConstructor(
+      ClassEntity classElement, Iterable<jsAst.Name> fields, bool hasRtiField) {
     // TODO(sra): Implement placeholders in VariableDeclaration position:
     //
     //     String constructorName = namer.getNameOfClass(classElement);
@@ -40,15 +53,15 @@
     ]);
   }
 
-  jsAst.Expression generateGetter(Element member, jsAst.Name fieldName) {
-    ClassElement cls = member.enclosingClass;
+  jsAst.Expression generateGetter(MemberEntity member, jsAst.Name fieldName) {
+    ClassEntity cls = member.enclosingClass;
     String receiver = backend.isInterceptorClass(cls) ? 'receiver' : 'this';
     List<String> args = backend.isInterceptedMethod(member) ? ['receiver'] : [];
     return js('function(#) { return #.# }', [args, receiver, fieldName]);
   }
 
-  jsAst.Expression generateSetter(Element member, jsAst.Name fieldName) {
-    ClassElement cls = member.enclosingClass;
+  jsAst.Expression generateSetter(MemberEntity member, jsAst.Name fieldName) {
+    ClassEntity cls = member.enclosingClass;
     String receiver = backend.isInterceptorClass(cls) ? 'receiver' : 'this';
     List<String> args = backend.isInterceptedMethod(member) ? ['receiver'] : [];
     // TODO(floitsch): remove 'return'?
@@ -62,9 +75,7 @@
    * Invariant: [member] must be a declaration element.
    */
   Map<jsAst.Name, jsAst.Expression> generateCallStubsForGetter(
-      Element member, Map<Selector, SelectorConstraints> selectors) {
-    assert(invariant(member, member.isDeclaration));
-
+      MemberEntity member, Map<Selector, SelectorConstraints> selectors) {
     // If the method is intercepted, the stub gets the
     // receiver explicitely and we need to pass it to the getter call.
     bool isInterceptedMethod = backend.isInterceptedMethod(member);
@@ -217,7 +228,7 @@
   Namer namer = backend.namer;
   Compiler compiler = backend.compiler;
 
-  Element closureFromTearOff = backend.helpers.closureFromTearOff;
+  FunctionEntity closureFromTearOff = backend.helpers.closureFromTearOff;
   jsAst.Expression tearOffAccessExpression;
   jsAst.Expression tearOffGlobalObjectString;
   jsAst.Expression tearOffGlobalObject;
@@ -225,9 +236,9 @@
     tearOffAccessExpression =
         backend.emitter.staticFunctionAccess(closureFromTearOff);
     tearOffGlobalObject =
-        js.stringPart(namer.globalObjectFor(closureFromTearOff));
+        js.stringPart(namer.globalObjectForMethod(closureFromTearOff));
     tearOffGlobalObjectString =
-        js.string(namer.globalObjectFor(closureFromTearOff));
+        js.string(namer.globalObjectForMethod(closureFromTearOff));
   } else {
     // Default values for mocked-up test libraries.
     tearOffAccessExpression =
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
index 0cc5b97..7b9314e 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -2,7 +2,28 @@
 // for 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 dart2js.js_emitter;
+library dart2js.js_emitter.code_emitter_task;
+
+import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin;
+
+import '../common.dart';
+import '../common/tasks.dart' show CompilerTask;
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../deferred_load.dart' show OutputUnit;
+import '../elements/elements.dart' show Entity;
+import '../elements/entities.dart';
+import '../js/js.dart' as jsAst;
+import '../js_backend/js_backend.dart' show JavaScriptBackend, Namer;
+import '../world.dart' show ClosedWorld;
+import 'full_emitter/emitter.dart' as full_js_emitter;
+import 'lazy_emitter/emitter.dart' as lazy_js_emitter;
+import 'program_builder/program_builder.dart';
+import 'startup_emitter/emitter.dart' as startup_js_emitter;
+
+import 'metadata_collector.dart' show MetadataCollector;
+import 'native_emitter.dart' show NativeEmitter;
+import 'type_test_registry.dart' show TypeTestRegistry;
 
 const USE_LAZY_EMITTER = const bool.fromEnvironment("dart2js.use.lazy.emitter");
 
@@ -21,8 +42,8 @@
   final Compiler compiler;
 
   /// Records if a type variable is read dynamically for type tests.
-  final Set<TypeVariableElement> readTypeVariables =
-      new Set<TypeVariableElement>();
+  final Set<TypeVariableEntity> readTypeVariables =
+      new Set<TypeVariableEntity>();
 
   JavaScriptBackend get backend => compiler.backend;
 
@@ -31,7 +52,7 @@
   // tests.
   // The field is set after the program has been emitted.
   /// Contains a list of all classes that are emitted.
-  Set<ClassElement> neededClasses;
+  Set<ClassEntity> neededClasses;
 
   CodeEmitterTask(
       Compiler compiler, bool generateSourceMap, bool useStartupEmitter)
@@ -65,13 +86,13 @@
   bool get supportsReflection => _emitterFactory.supportsReflection;
 
   /// Returns the closure expression of a static function.
-  jsAst.Expression isolateStaticClosureAccess(MethodElement element) {
+  jsAst.Expression isolateStaticClosureAccess(FunctionEntity element) {
     return emitter.isolateStaticClosureAccess(element);
   }
 
   /// Returns the JS function that must be invoked to get the value of the
   /// lazily initialized static.
-  jsAst.Expression isolateLazyInitializerAccess(FieldElement element) {
+  jsAst.Expression isolateLazyInitializerAccess(FieldEntity element) {
     return emitter.isolateLazyInitializerAccess(element);
   }
 
@@ -85,37 +106,37 @@
     return emitter.constantReference(constant);
   }
 
-  jsAst.Expression staticFieldAccess(FieldElement e) {
+  jsAst.Expression staticFieldAccess(FieldEntity e) {
     return emitter.staticFieldAccess(e);
   }
 
   /// Returns the JS function representing the given function.
   ///
   /// The function must be invoked and can not be used as closure.
-  jsAst.Expression staticFunctionAccess(MethodElement e) {
+  jsAst.Expression staticFunctionAccess(FunctionEntity e) {
     return emitter.staticFunctionAccess(e);
   }
 
   /// Returns the JS constructor of the given element.
   ///
   /// The returned expression must only be used in a JS `new` expression.
-  jsAst.Expression constructorAccess(ClassElement e) {
+  jsAst.Expression constructorAccess(ClassEntity e) {
     return emitter.constructorAccess(e);
   }
 
   /// Returns the JS prototype of the given class [e].
-  jsAst.Expression prototypeAccess(ClassElement e,
+  jsAst.Expression prototypeAccess(ClassEntity e,
       {bool hasBeenInstantiated: false}) {
     return emitter.prototypeAccess(e, hasBeenInstantiated);
   }
 
   /// Returns the JS prototype of the given interceptor class [e].
-  jsAst.Expression interceptorPrototypeAccess(ClassElement e) {
+  jsAst.Expression interceptorPrototypeAccess(ClassEntity e) {
     return jsAst.js('#.prototype', interceptorClassAccess(e));
   }
 
   /// Returns the JS constructor of the given interceptor class [e].
-  jsAst.Expression interceptorClassAccess(ClassElement e) {
+  jsAst.Expression interceptorClassAccess(ClassEntity e) {
     return emitter.interceptorClassAccess(e);
   }
 
@@ -131,11 +152,11 @@
     return emitter.templateForBuiltin(builtin);
   }
 
-  void registerReadTypeVariable(TypeVariableElement element) {
+  void registerReadTypeVariable(TypeVariableEntity element) {
     readTypeVariables.add(element);
   }
 
-  Set<ClassElement> _finalizeRti() {
+  Set<ClassEntity> _finalizeRti() {
     // Compute the required type checks to know which classes need a
     // 'is$' method.
     typeTestRegistry.computeRequiredTypeChecks();
@@ -156,7 +177,7 @@
     return measure(() {
       emitter.invalidateCaches();
 
-      Set<ClassElement> rtiNeededClasses = _finalizeRti();
+      Set<ClassEntity> rtiNeededClasses = _finalizeRti();
       ProgramBuilder programBuilder = new ProgramBuilder(
           compiler, namer, this, emitter, closedWorld, rtiNeededClasses);
       int size = emitter.emitProgram(programBuilder);
@@ -187,10 +208,10 @@
 
   /// Returns the JS function that must be invoked to get the value of the
   /// lazily initialized static.
-  jsAst.Expression isolateLazyInitializerAccess(FieldElement element);
+  jsAst.Expression isolateLazyInitializerAccess(FieldEntity element);
 
   /// Returns the closure expression of a static function.
-  jsAst.Expression isolateStaticClosureAccess(FunctionElement element);
+  jsAst.Expression isolateStaticClosureAccess(FunctionEntity element);
 
   /// Returns the JS code for accessing the embedded [global].
   jsAst.Expression generateEmbeddedGlobalAccess(String global);
@@ -198,20 +219,20 @@
   /// Returns the JS function representing the given function.
   ///
   /// The function must be invoked and can not be used as closure.
-  jsAst.Expression staticFunctionAccess(FunctionElement element);
+  jsAst.Expression staticFunctionAccess(FunctionEntity element);
 
-  jsAst.Expression staticFieldAccess(FieldElement element);
+  jsAst.Expression staticFieldAccess(FieldEntity element);
 
   /// Returns the JS constructor of the given element.
   ///
   /// The returned expression must only be used in a JS `new` expression.
-  jsAst.Expression constructorAccess(ClassElement e);
+  jsAst.Expression constructorAccess(ClassEntity e);
 
   /// Returns the JS prototype of the given class [e].
-  jsAst.Expression prototypeAccess(ClassElement e, bool hasBeenInstantiated);
+  jsAst.Expression prototypeAccess(ClassEntity e, bool hasBeenInstantiated);
 
   /// Returns the JS constructor of the given interceptor class [e].
-  jsAst.Expression interceptorClassAccess(ClassElement e);
+  jsAst.Expression interceptorClassAccess(ClassEntity e);
 
   /// Returns the JS expression representing the type [e].
   jsAst.Expression typeAccess(Entity e);
@@ -228,5 +249,8 @@
   /// Returns the JS template for the given [builtin].
   jsAst.Template templateForBuiltin(JsBuiltin builtin);
 
+  /// Returns the size of the code generated for a given output [unit].
+  int generatedSize(OutputUnit unit);
+
   void invalidateCaches();
 }
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart
index 2e0cb0e..f0167e1 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/class_builder.dart
@@ -2,7 +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.
 
-part of dart2js.js_emitter.full_emitter;
+library dart2js.js_emitter.full_emitter.class_builder;
+
+import '../../elements/elements.dart' show Entity;
+import '../../elements/entities.dart';
+import '../../js/js.dart' as jsAst;
+import '../../js/js.dart' show js;
+import '../../js_backend/js_backend.dart' show Namer;
 
 /**
  * A data structure for collecting fragments of a class definition.
@@ -15,13 +21,13 @@
   jsAst.Node functionType;
   List<jsAst.Node> fieldMetadata;
 
-  final Element element;
+  final Entity element;
   final Namer namer;
   final bool isForActualClass;
 
   ClassBuilder(this.element, this.namer, this.isForActualClass);
 
-  ClassBuilder.forClass(ClassElement cls, this.namer)
+  ClassBuilder.forClass(ClassEntity cls, this.namer)
       : isForActualClass = true,
         element = cls;
 
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 979e11d..c5d5181 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
@@ -2,7 +2,23 @@
 // for 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 dart2js.js_emitter.full_emitter;
+library dart2js.js_emitter.full_emitter.class_emitter;
+
+import '../../common.dart';
+import '../../common/names.dart' show Names;
+import '../../elements/resolution_types.dart' show ResolutionDartType;
+import '../../deferred_load.dart' show OutputUnit;
+import '../../elements/elements.dart'
+    show ClassElement, Element, FieldElement, MemberElement, Name;
+import '../../js/js.dart' as jsAst;
+import '../../js/js.dart' show js;
+import '../../js_backend/js_backend.dart' show CompoundName, Namer;
+import '../../universe/selector.dart' show Selector;
+import '../../util/util.dart' show equalElements;
+import '../../world.dart' show ClosedWorld;
+import '../js_emitter.dart' hide Emitter, EmitterFactory;
+import '../model.dart';
+import 'emitter.dart';
 
 class ClassEmitter extends CodeEmitterHelper {
   final ClosedWorld closedWorld;
@@ -199,7 +215,7 @@
     if (cls.onlyForRti) return;
 
     for (StubMethod method in cls.checkedSetters) {
-      Element member = method.element;
+      MemberElement member = method.element;
       assert(member != null);
       jsAst.Expression code = method.code;
       jsAst.Name setterName = method.name;
@@ -215,7 +231,7 @@
     if (!compiler.options.useContentSecurityPolicy || cls.onlyForRti) return;
 
     for (Field field in cls.fields) {
-      Element member = field.element;
+      FieldElement member = field.element;
       reporter.withCurrentElement(member, () {
         if (field.needsGetter) {
           emitGetterForCSP(member, field.name, field.accessorName, builder);
@@ -251,7 +267,6 @@
     }
 
     for (Method method in cls.methods) {
-      assert(invariant(classElement, method.element.isDeclaration));
       assert(invariant(classElement, method.element.isInstanceMember));
       emitter.containerBuilder.addMemberMethod(method, builder);
     }
@@ -374,7 +389,7 @@
         message: '$previousName != ${memberName}'));
   }
 
-  void emitGetterForCSP(Element member, jsAst.Name fieldName,
+  void emitGetterForCSP(FieldElement member, jsAst.Name fieldName,
       jsAst.Name accessorName, ClassBuilder builder) {
     jsAst.Expression function =
         _stubGenerator.generateGetter(member, fieldName);
@@ -394,7 +409,7 @@
     }
   }
 
-  void emitSetterForCSP(Element member, jsAst.Name fieldName,
+  void emitSetterForCSP(FieldElement member, jsAst.Name fieldName,
       jsAst.Name accessorName, ClassBuilder builder) {
     jsAst.Expression function =
         _stubGenerator.generateSetter(member, fieldName);
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart
index d0c0d93..8d344ae 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/container_builder.dart
@@ -2,7 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js.js_emitter.full_emitter;
+library dart2js.js_emitter.full_emitter.container_builder;
+
+import '../../constants/values.dart';
+import '../../elements/elements.dart'
+    show
+        Element,
+        Elements,
+        FunctionSignature,
+        MetadataAnnotation,
+        MethodElement;
+import '../../js/js.dart' as jsAst;
+import '../../js/js.dart' show js;
+import '../js_emitter.dart' hide Emitter, EmitterFactory;
+import '../model.dart';
+import 'emitter.dart';
 
 /// This class should morph into something that makes it easy to build
 /// JavaScript representations of libraries, class-sides, and instance-sides.
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index 84b8e31..3e5b669 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -12,7 +12,6 @@
     show JsBuiltin, JsGetName;
 
 import '../../common.dart';
-import '../../common/names.dart' show Names;
 import '../../compiler.dart' show Compiler;
 import '../../constants/values.dart';
 import '../../core_types.dart' show CommonElements;
@@ -23,14 +22,12 @@
         ClassElement,
         Element,
         Elements,
+        Entity,
         FieldElement,
         FunctionElement,
         FunctionSignature,
         LibraryElement,
-        MemberElement,
-        MetadataAnnotation,
         MethodElement,
-        Name,
         TypedefElement,
         VariableElement;
 import '../../hash/sha1.dart' show Hasher;
@@ -43,9 +40,7 @@
 import '../../js_backend/backend_helpers.dart' show BackendHelpers;
 import '../../js_backend/js_backend.dart'
     show
-        CompoundName,
         ConstantEmitter,
-        GetterName,
         JavaScriptBackend,
         JavaScriptConstantCompiler,
         Namer,
@@ -54,9 +49,7 @@
 import '../../universe/call_structure.dart' show CallStructure;
 import '../../universe/selector.dart' show Selector;
 import '../../universe/world_builder.dart' show CodegenWorldBuilder;
-import '../../util/characters.dart' show $$, $A, $HASH, $Z, $a, $z;
 import '../../util/uri_extras.dart' show relativize;
-import '../../util/util.dart' show equalElements;
 import '../../world.dart' show ClosedWorld;
 import '../constant_ordering.dart' show deepCompareConstants;
 import '../headers.dart';
@@ -65,14 +58,21 @@
 import '../model.dart';
 import '../program_builder/program_builder.dart';
 
-part 'class_builder.dart';
-part 'class_emitter.dart';
+import 'class_builder.dart';
+import 'class_emitter.dart';
+import 'container_builder.dart';
+import 'interceptor_emitter.dart';
+import 'nsm_emitter.dart';
+
+export 'class_builder.dart';
+export 'class_emitter.dart';
+export 'container_builder.dart';
+export 'interceptor_emitter.dart';
+export 'nsm_emitter.dart';
+
 part 'code_emitter_helper.dart';
-part 'container_builder.dart';
 part 'declarations.dart';
 part 'deferred_output_unit_hash.dart';
-part 'interceptor_emitter.dart';
-part 'nsm_emitter.dart';
 part 'setup_program_builder.dart';
 
 class EmitterFactory implements js_emitter.EmitterFactory {
@@ -338,7 +338,7 @@
   }
 
   @override
-  jsAst.PropertyAccess staticFunctionAccess(FunctionElement element) {
+  jsAst.PropertyAccess staticFunctionAccess(MethodElement element) {
     return globalPropertyAccess(element);
   }
 
@@ -359,7 +359,7 @@
   }
 
   @override
-  jsAst.PropertyAccess typeAccess(Element element) {
+  jsAst.PropertyAccess typeAccess(Entity element) {
     return globalPropertyAccess(element);
   }
 
@@ -420,6 +420,11 @@
     }
   }
 
+  @override
+  int generatedSize(OutputUnit unit) {
+    return outputBuffers[unit].length;
+  }
+
   List<jsAst.Statement> buildTrivialNsmHandlers() {
     return nsmEmitter.buildTrivialNsmHandlers();
   }
@@ -614,7 +619,7 @@
     if (staticFunctions == null) return;
 
     for (Method method in staticFunctions) {
-      Element element = method.element;
+      MethodElement element = method.element;
       // We need to filter out null-elements for the interceptors.
       // TODO(floitsch): use the precomputed interceptors here.
       if (element == null) continue;
@@ -2180,8 +2185,6 @@
     for (Element element in backend.codegenEnqueuer.newlyEnqueuedElements) {
       if (element.isInstanceMember) {
         cachedClassBuilders.remove(element.enclosingClass);
-
-        nativeEmitter.cachedBuilders.remove(element.enclosingClass);
       }
     }
   }
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
index 1c90f92..516641d 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
@@ -2,7 +2,16 @@
 // for 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 dart2js.js_emitter.full_emitter;
+library dart2js.js_emitter.full_emitter.interceptor_emitter;
+
+import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
+import '../../elements/entities.dart';
+import '../../js/js.dart' as jsAst;
+import '../../js/js.dart' show js;
+import '../../world.dart' show ClosedWorld;
+import '../js_emitter.dart' hide Emitter, EmitterFactory;
+import '../model.dart';
+import 'emitter.dart';
 
 class InterceptorEmitter extends CodeEmitterHelper {
   final ClosedWorld closedWorld;
@@ -10,15 +19,14 @@
 
   InterceptorEmitter(this.closedWorld);
 
-  void recordMangledNameOfMemberMethod(
-      FunctionElement member, jsAst.Name name) {
+  void recordMangledNameOfMemberMethod(MemberEntity member, jsAst.Name name) {
     if (backend.isInterceptedMethod(member)) {
       interceptorInvocationNames.add(name);
     }
   }
 
   jsAst.Expression buildGetInterceptorMethod(
-      jsAst.Name key, Set<ClassElement> classes) {
+      jsAst.Name key, Set<ClassEntity> classes) {
     InterceptorStubGenerator stubGenerator =
         new InterceptorStubGenerator(compiler, namer, backend, closedWorld);
     jsAst.Expression function =
@@ -35,11 +43,11 @@
 
     parts.add(js.comment('getInterceptor methods'));
 
-    Map<jsAst.Name, Set<ClassElement>> specializedGetInterceptors =
+    Map<jsAst.Name, Set<ClassEntity>> specializedGetInterceptors =
         backend.specializedGetInterceptors;
     List<jsAst.Name> names = specializedGetInterceptors.keys.toList()..sort();
     for (jsAst.Name name in names) {
-      Set<ClassElement> classes = specializedGetInterceptors[name];
+      Set<ClassEntity> classes = specializedGetInterceptors[name];
       parts.add(js.statement('#.# = #', [
         namer.globalObjectFor(backend.helpers.interceptorsLibrary),
         name,
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart
index 3bc27de..472a2c7 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/nsm_emitter.dart
@@ -2,7 +2,18 @@
 // for 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 dart2js.js_emitter.full_emitter;
+library dart2js.js_emitter.full_emitter.nsm_emitter;
+
+import '../../elements/entities.dart';
+import '../../js/js.dart' as jsAst;
+import '../../js/js.dart' show js;
+import '../../js_backend/js_backend.dart' show GetterName, SetterName;
+import '../../universe/selector.dart' show Selector;
+import '../../util/characters.dart' show $$, $A, $HASH, $Z, $a, $z;
+import '../../world.dart' show ClosedWorld;
+import '../js_emitter.dart' hide Emitter, EmitterFactory;
+import '../model.dart';
+import 'emitter.dart';
 
 class NsmEmitter extends CodeEmitterHelper {
   final ClosedWorld closedWorld;
@@ -61,7 +72,7 @@
         if (reflectionName != null) {
           bool accessible = closedWorld.allFunctions
               .filter(selector, null)
-              .any((MemberElement e) => backend.isAccessibleByReflection(e));
+              .any(backend.isMemberAccessibleByReflection);
           addProperty(
               namer.asName('+$reflectionName'), js(accessible ? '2' : '0'));
         }
@@ -162,7 +173,7 @@
     }
     // Startup code that loops over the method names and puts handlers on the
     // Object class to catch noSuchMethod invocations.
-    ClassElement objectClass = compiler.commonElements.objectClass;
+    ClassEntity objectClass = compiler.commonElements.objectClass;
     jsAst.Expression createInvocationMirror = backend.emitter
         .staticFunctionAccess(backend.helpers.createInvocationMirror);
     if (useDiffEncoding) {
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
index 24a66e9..a8dc281 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
@@ -134,8 +134,8 @@
     'trivialNsmHandlers': emitter.buildTrivialNsmHandlers(),
     'hasRetainedMetadata': backend.hasRetainedMetadata,
     'types': typesAccess,
-    'objectClassName': js
-        .quoteName(namer.runtimeTypeName(compiler.commonElements.objectClass)),
+    'objectClassName': js.quoteName(
+        namer.runtimeTypeName(compiler.commonElements.objectClass as Entity)),
     'needsStructuredMemberInfo': emitter.needsStructuredMemberInfo,
     'usesMangledNames': compiler.commonElements.mirrorsLibrary != null ||
         backend.hasFunctionApplySupport,
diff --git a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
index d235adb..7c3337e 100644
--- a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
@@ -2,7 +2,25 @@
 // for 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 dart2js.js_emitter;
+library dart2js.js_emitter.interceptor_stub_generator;
+
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../elements/entities.dart';
+import '../elements/types.dart' show InterfaceType;
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart'
+    show
+        CustomElementsAnalysis,
+        JavaScriptBackend,
+        JavaScriptConstantCompiler,
+        Namer;
+import '../universe/selector.dart' show Selector;
+import '../world.dart' show ClosedWorld;
+
+import 'code_emitter_task.dart' show Emitter;
 
 class InterceptorStubGenerator {
   final Compiler compiler;
@@ -17,8 +35,8 @@
 
   BackendHelpers get helpers => backend.helpers;
 
-  jsAst.Expression generateGetInterceptorMethod(Set<ClassElement> classes) {
-    jsAst.Expression interceptorFor(ClassElement cls) {
+  jsAst.Expression generateGetInterceptorMethod(Set<ClassEntity> classes) {
+    jsAst.Expression interceptorFor(ClassEntity cls) {
       return backend.emitter.interceptorPrototypeAccess(cls);
     }
 
@@ -26,7 +44,7 @@
      * Build a JavaScrit AST node for doing a type check on
      * [cls]. [cls] must be a non-native interceptor class.
      */
-    jsAst.Statement buildInterceptorCheck(ClassElement cls) {
+    jsAst.Statement buildInterceptorCheck(ClassEntity cls) {
       jsAst.Expression condition;
       assert(backend.isInterceptorClass(cls));
       if (cls == helpers.jsBoolClass) {
@@ -61,7 +79,7 @@
     bool anyNativeClasses =
         compiler.enqueuer.codegen.nativeEnqueuer.hasInstantiatedNativeClasses;
 
-    for (ClassElement cls in classes) {
+    for (ClassEntity cls in classes) {
       if (cls == helpers.jsArrayClass ||
           cls == helpers.jsMutableArrayClass ||
           cls == helpers.jsFixedArrayClass ||
@@ -168,7 +186,7 @@
                 .staticFunctionAccess(helpers.getNativeInterceptorMethod)
           ]));
     } else {
-      ClassElement jsUnknown = helpers.jsUnknownJavaScriptObjectClass;
+      ClassEntity jsUnknown = helpers.jsUnknownJavaScriptObjectClass;
       if (compiler.codegenWorldBuilder.directlyInstantiatedClasses
           .contains(jsUnknown)) {
         statements.add(js.statement('if (!(receiver instanceof #)) return #;', [
@@ -188,7 +206,7 @@
   // common case for a one-shot interceptor, or null if there is no
   // fast path.
   jsAst.Statement _fastPathForOneShotInterceptor(
-      Selector selector, Set<ClassElement> classes) {
+      Selector selector, Set<ClassEntity> classes) {
     if (selector.isOperator) {
       String name = selector.name;
       if (name == '==') {
@@ -320,7 +338,7 @@
 
   jsAst.Expression generateOneShotInterceptor(jsAst.Name name) {
     Selector selector = backend.oneShotInterceptors[name];
-    Set<ClassElement> classes = backend.getInterceptedClassesOn(selector.name);
+    Set<ClassEntity> classes = backend.getInterceptedClassesOn(selector.name);
     jsAst.Name getInterceptorName = namer.nameForGetInterceptor(classes);
 
     List<String> parameterNames = <String>[];
@@ -362,40 +380,37 @@
         handler.getConstantsForEmission(emitter.compareConstants);
     for (ConstantValue constant in constants) {
       if (constant is TypeConstantValue &&
-          constant.representedType is ResolutionInterfaceType) {
-        ResolutionInterfaceType type = constant.representedType;
-        Element element = type.element;
-        if (element is ClassElement) {
-          ClassElement classElement = element;
-          if (!analysis.needsClass(classElement)) continue;
+          constant.representedType is InterfaceType) {
+        InterfaceType type = constant.representedType;
+        ClassEntity classElement = type.element;
+        if (!analysis.needsClass(classElement)) continue;
 
-          elements.add(emitter.constantReference(constant));
-          elements.add(backend.emitter.interceptorClassAccess(classElement));
+        elements.add(emitter.constantReference(constant));
+        elements.add(backend.emitter.interceptorClassAccess(classElement));
 
-          // Create JavaScript Object map for by-name lookup of generative
-          // constructors.  For example, the class A has three generative
-          // constructors
-          //
-          //     class A {
-          //       A() {}
-          //       A.foo() {}
-          //       A.bar() {}
-          //     }
-          //
-          // Which are described by the map
-          //
-          //     {"": A.A$, "foo": A.A$foo, "bar": A.A$bar}
-          //
-          // We expect most of the time the map will be a singleton.
-          var properties = [];
-          for (Element member in analysis.constructors(classElement)) {
-            properties.add(new jsAst.Property(js.string(member.name),
-                backend.emitter.staticFunctionAccess(member)));
-          }
-
-          var map = new jsAst.ObjectInitializer(properties);
-          elements.add(map);
+        // Create JavaScript Object map for by-name lookup of generative
+        // constructors.  For example, the class A has three generative
+        // constructors
+        //
+        //     class A {
+        //       A() {}
+        //       A.foo() {}
+        //       A.bar() {}
+        //     }
+        //
+        // Which are described by the map
+        //
+        //     {"": A.A$, "foo": A.A$foo, "bar": A.A$bar}
+        //
+        // We expect most of the time the map will be a singleton.
+        var properties = [];
+        for (FunctionEntity member in analysis.constructors(classElement)) {
+          properties.add(new jsAst.Property(js.string(member.name),
+              backend.emitter.staticFunctionAccess(member)));
         }
+
+        var map = new jsAst.ObjectInitializer(properties);
+        elements.add(map);
       }
     }
 
diff --git a/pkg/compiler/lib/src/js_emitter/js_emitter.dart b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
index de47054..f026734 100644
--- a/pkg/compiler/lib/src/js_emitter/js_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
@@ -4,77 +4,17 @@
 
 library dart2js.js_emitter;
 
-import 'package:js_ast/src/precedence.dart' as js_precedence;
-import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
-import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin;
+import '../elements/elements.dart' show ClassElement, MixinApplicationElement;
 
-import '../closure.dart'
-    show ClosureClassElement, ClosureClassMap, ClosureFieldElement;
-import '../common.dart';
-import '../common/names.dart' show Identifiers;
-import '../common/tasks.dart' show CompilerTask;
-import '../compiler.dart' show Compiler;
-import '../constants/values.dart';
-import '../core_types.dart' show CommonElements;
-import '../elements/resolution_types.dart'
-    show
-        ResolutionDartType,
-        ResolutionFunctionType,
-        ResolutionInterfaceType,
-        ResolutionTypedefType,
-        Types,
-        ResolutionTypeVariableType;
-import '../deferred_load.dart' show OutputUnit;
-import '../elements/elements.dart'
-    show
-        ClassElement,
-        ConstructorElement,
-        Element,
-        ElementKind,
-        Entity,
-        FieldElement,
-        FunctionElement,
-        FunctionSignature,
-        MetadataAnnotation,
-        MethodElement,
-        MixinApplicationElement,
-        ParameterElement,
-        TypeVariableElement;
-import '../js/js.dart' as jsAst;
-import '../js/js.dart' show js;
-import '../js_backend/backend_helpers.dart' show BackendHelpers;
-import '../js_backend/js_backend.dart'
-    show
-        CustomElementsAnalysis,
-        JavaScriptBackend,
-        JavaScriptConstantCompiler,
-        Namer,
-        RuntimeTypes,
-        RuntimeTypesEncoder,
-        Substitution,
-        TypeCheck,
-        TypeChecks,
-        TypeVariableHandler;
-import '../universe/call_structure.dart' show CallStructure;
-import '../universe/selector.dart' show Selector;
-import '../universe/world_builder.dart'
-    show CodegenWorldBuilder, SelectorConstraints;
-import '../util/util.dart' show Setlet;
-import '../world.dart' show ClosedWorld;
-import 'full_emitter/emitter.dart' as full_js_emitter;
-import 'lazy_emitter/emitter.dart' as lazy_js_emitter;
-import 'model.dart';
-import 'program_builder/program_builder.dart';
-import 'startup_emitter/emitter.dart' as startup_js_emitter;
+export 'class_stub_generator.dart';
+export 'code_emitter_task.dart';
+export 'interceptor_stub_generator.dart';
+export 'main_call_stub_generator.dart';
+export 'metadata_collector.dart';
+export 'native_emitter.dart';
+export 'native_generator.dart';
+export 'parameter_stub_generator.dart';
+export 'runtime_type_generator.dart';
+export 'type_test_registry.dart';
 
-part 'class_stub_generator.dart';
-part 'code_emitter_task.dart';
 part 'helpers.dart';
-part 'interceptor_stub_generator.dart';
-part 'main_call_stub_generator.dart';
-part 'metadata_collector.dart';
-part 'native_emitter.dart';
-part 'native_generator.dart';
-part 'parameter_stub_generator.dart';
-part 'runtime_type_generator.dart';
-part 'type_test_registry.dart';
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
index a38de70..ab86f53 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
@@ -9,8 +9,9 @@
 import '../../common.dart';
 import '../../compiler.dart' show Compiler;
 import '../../constants/values.dart' show ConstantValue;
+import '../../deferred_load.dart' show OutputUnit;
 import '../../elements/elements.dart'
-    show ClassElement, Element, FieldElement, FunctionElement;
+    show ClassElement, Element, Entity, FieldElement, MethodElement;
 import '../../js/js.dart' as js;
 import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer;
 import '../../world.dart' show ClosedWorld;
@@ -96,7 +97,7 @@
   }
 
   @override
-  js.Expression isolateStaticClosureAccess(FunctionElement element) {
+  js.Expression isolateStaticClosureAccess(MethodElement element) {
     return _emitter.generateStaticClosureAccess(element);
   }
 
@@ -106,7 +107,7 @@
   }
 
   @override
-  js.PropertyAccess staticFunctionAccess(FunctionElement element) {
+  js.PropertyAccess staticFunctionAccess(MethodElement element) {
     return _globalPropertyAccess(element);
   }
 
@@ -131,7 +132,7 @@
   }
 
   @override
-  js.Expression typeAccess(Element element) {
+  js.Expression typeAccess(Entity element) {
     // TODO(floitsch): minify 'ensureResolved'.
     // TODO(floitsch): don't emit `ensureResolved` for eager classes.
     return js.js('#.ensureResolved()', _globalPropertyAccess(element));
@@ -188,5 +189,9 @@
   }
 
   @override
+  // TODO(het): Generate this correctly
+  int generatedSize(OutputUnit unit) => 0;
+
+  @override
   void invalidateCaches() {}
 }
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
index 640bf8a..570526a 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
@@ -860,7 +860,8 @@
         data.add(js.quoteName(method.callName, allowNull: true));
 
         if (method.needsTearOff) {
-          bool isIntercepted = backend.isInterceptedMethod(method.element);
+          MethodElement element = method.element;
+          bool isIntercepted = backend.isInterceptedMethod(element);
           data.add(new js.LiteralBool(isIntercepted));
           data.add(js.quoteName(method.tearOffName));
           data.add((method.functionType));
diff --git a/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
index d104cd4..3586026 100644
--- a/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
@@ -2,21 +2,32 @@
 // for 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 dart2js.js_emitter;
+library dart2js.js_emitter.main_call_stub_generator;
+
+import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
+
+import '../elements/entities.dart';
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart' show JavaScriptBackend;
+
+import 'code_emitter_task.dart' show CodeEmitterTask;
 
 class MainCallStubGenerator {
-  final Compiler compiler;
   final JavaScriptBackend backend;
   final CodeEmitterTask emitterTask;
+  final bool hasIncrementalSupport;
 
-  MainCallStubGenerator(this.compiler, this.backend, this.emitterTask);
+  MainCallStubGenerator(this.backend, this.emitterTask,
+      {this.hasIncrementalSupport: false});
 
   BackendHelpers get helpers => backend.helpers;
 
   /// Returns the code equivalent to:
   ///   `function(args) { $.startRootIsolate(X.main$closure(), args); }`
   jsAst.Expression _buildIsolateSetupClosure(
-      Element appMain, Element isolateMain) {
+      FunctionEntity appMain, FunctionEntity isolateMain) {
     jsAst.Expression mainAccess =
         emitterTask.isolateStaticClosureAccess(appMain);
     // Since we pass the closurized version of the main method to
@@ -25,14 +36,12 @@
         [emitterTask.staticFunctionAccess(isolateMain), mainAccess]);
   }
 
-  jsAst.Statement generateInvokeMain() {
-    Element main = compiler.mainFunction;
+  jsAst.Statement generateInvokeMain(FunctionEntity main) {
     jsAst.Expression mainCallClosure = null;
     if (backend.hasIsolateSupport) {
-      Element isolateMain =
-          helpers.isolateHelperLibrary.find(BackendHelpers.START_ROOT_ISOLATE);
+      FunctionEntity isolateMain = helpers.startRootIsolate;
       mainCallClosure = _buildIsolateSetupClosure(main, isolateMain);
-    } else if (compiler.options.hasIncrementalSupport) {
+    } else if (hasIncrementalSupport) {
       mainCallClosure = js(
           'function() { return #(); }', emitterTask.staticFunctionAccess(main));
     } else {
diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
index d625e44..6c84560 100644
--- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.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.
 
-part of dart2js.js_emitter;
+library dart2js.js_emitter.metadata_collector;
+
+import 'package:js_ast/src/precedence.dart' as js_precedence;
+
+import '../common.dart';
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../elements/resolution_types.dart'
+    show ResolutionDartType, ResolutionTypedefType;
+import '../deferred_load.dart' show OutputUnit;
+import '../elements/elements.dart'
+    show
+        ConstructorElement,
+        Element,
+        FunctionElement,
+        FunctionSignature,
+        MetadataAnnotation,
+        ParameterElement;
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/js_backend.dart'
+    show JavaScriptBackend, TypeVariableHandler;
+
+import 'code_emitter_task.dart' show Emitter;
 
 /// Represents an entry's position in one of the global metadata arrays.
 ///
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index 62070c2..b4473a6 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -6,7 +6,7 @@
 
 import '../constants/values.dart' show ConstantValue;
 import '../deferred_load.dart' show OutputUnit;
-import '../elements/elements.dart' show Element;
+import '../elements/entities.dart';
 import '../js/js.dart' as js show Expression, Name, Statement, TokenFinalizer;
 import 'js_emitter.dart' show MetadataCollector;
 
@@ -178,7 +178,7 @@
 class Library implements FieldContainer {
   /// The element should only be used during the transition to the new model.
   /// Uses indicate missing information in the model.
-  final Element element;
+  final LibraryEntity element;
 
   final String uri;
   final List<StaticMethod> statics;
@@ -193,7 +193,7 @@
 class StaticField {
   /// The element should only be used during the transition to the new model.
   /// Uses indicate missing information in the model.
-  final Element element;
+  final FieldEntity element;
 
   js.Name name;
   // TODO(floitsch): the holder for static fields is the isolate object. We
@@ -210,7 +210,7 @@
 class Class implements FieldContainer {
   /// The element should only be used during the transition to the new model.
   /// Uses indicate missing information in the model.
-  final Element element;
+  final ClassEntity element;
 
   final js.Name name;
   final Holder holder;
@@ -289,7 +289,7 @@
   Class _mixinClass;
 
   MixinApplication(
-      Element element,
+      ClassEntity element,
       js.Name name,
       Holder holder,
       List<Field> instanceFields,
@@ -335,7 +335,7 @@
 class Field {
   /// The element should only be used during the transition to the new model.
   /// Uses indicate missing information in the model.
-  final Element element;
+  final FieldEntity element;
 
   final js.Name name;
   final js.Name accessorName;
@@ -374,7 +374,7 @@
 abstract class Method {
   /// The element should only be used during the transition to the new model.
   /// Uses indicate missing information in the model.
-  final Element element;
+  final MemberEntity element;
 
   /// The name of the method. If the method is a [ParameterStubMethod] for a
   /// static function, then the name can be `null`. In that case, only the
@@ -410,7 +410,7 @@
   // `call$1$name` (in unminified mode).
   final js.Name callName;
 
-  DartMethod(Element element, js.Name name, js.Expression code,
+  DartMethod(FunctionEntity element, js.Name name, js.Expression code,
       this.parameterStubs, this.callName,
       {this.needsTearOff,
       this.tearOffName,
@@ -444,7 +444,7 @@
   /// functions that can be torn off.
   final bool isClosureCallMethod;
 
-  InstanceMethod(Element element, js.Name name, js.Expression code,
+  InstanceMethod(FunctionEntity element, js.Name name, js.Expression code,
       List<ParameterStubMethod> parameterStubs, js.Name callName,
       {bool needsTearOff,
       js.Name tearOffName,
@@ -473,7 +473,7 @@
 /// to a method in the original Dart program. Examples are getter and setter
 /// stubs and stubs to dispatch calls to methods with optional parameters.
 class StubMethod extends Method {
-  StubMethod(js.Name name, js.Expression code, {Element element})
+  StubMethod(js.Name name, js.Expression code, {MemberEntity element})
       : super(element, name, code);
 }
 
@@ -506,7 +506,7 @@
   final Holder holder;
 
   StaticDartMethod(
-      Element element,
+      FunctionEntity element,
       js.Name name,
       this.holder,
       js.Expression code,
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index b782831..c49895a 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -2,32 +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.
 
-part of dart2js.js_emitter;
+library dart2js.js_emitter.native_emitter;
+
+import '../common.dart';
+import '../compiler.dart' show Compiler;
+import '../elements/types.dart' show DartType, FunctionType;
+import '../elements/entities.dart';
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/backend_helpers.dart' show BackendHelpers;
+import '../js_backend/js_backend.dart' show JavaScriptBackend;
+import '../universe/world_builder.dart' show CodegenWorldBuilder;
+
+import 'code_emitter_task.dart' show CodeEmitterTask;
+import 'model.dart';
 
 class NativeEmitter {
-  // TODO(floitsch): the native-emitter should not know about ClassBuilders.
-  final Map<Element, full_js_emitter.ClassBuilder> cachedBuilders;
-
   final CodeEmitterTask emitterTask;
 
   // Whether the application contains native classes.
   bool hasNativeClasses = false;
 
   // Caches the native subtypes of a native class.
-  Map<ClassElement, List<ClassElement>> subtypes;
+  Map<ClassEntity, List<ClassEntity>> subtypes =
+      <ClassEntity, List<ClassEntity>>{};
 
   // Caches the direct native subtypes of a native class.
-  Map<ClassElement, List<ClassElement>> directSubtypes;
+  Map<ClassEntity, List<ClassEntity>> directSubtypes =
+      <ClassEntity, List<ClassEntity>>{};
 
   // Caches the methods that have a native body.
-  Set<FunctionElement> nativeMethods;
+  Set<FunctionEntity> nativeMethods = new Set<FunctionEntity>();
 
-  NativeEmitter(CodeEmitterTask emitterTask)
-      : this.emitterTask = emitterTask,
-        subtypes = new Map<ClassElement, List<ClassElement>>(),
-        directSubtypes = new Map<ClassElement, List<ClassElement>>(),
-        nativeMethods = new Set<FunctionElement>(),
-        cachedBuilders = emitterTask.compiler.cacheStrategy.newMap();
+  NativeEmitter(CodeEmitterTask emitterTask) : this.emitterTask = emitterTask;
 
   Compiler get compiler => emitterTask.compiler;
 
@@ -35,6 +42,8 @@
 
   BackendHelpers get helpers => backend.helpers;
 
+  CodegenWorldBuilder get worldBuilder => compiler.codegenWorldBuilder;
+
   /**
    * Prepares native classes for emission. Returns the unneeded classes.
    *
@@ -67,8 +76,8 @@
    */
   Set<Class> prepareNativeClasses(
       List<Class> classes,
-      Set<ClassElement> interceptorClassesNeededByConstants,
-      Set<ClassElement> classesModifiedByEmitRTISupport) {
+      Set<ClassEntity> interceptorClassesNeededByConstants,
+      Set<ClassEntity> classesModifiedByEmitRTISupport) {
     assert(classes.every((Class cls) => cls != null));
 
     hasNativeClasses = classes.isNotEmpty;
@@ -111,7 +120,7 @@
     neededClasses.add(objectClass);
 
     for (Class cls in preOrder.reversed) {
-      ClassElement classElement = cls.element;
+      ClassEntity classElement = cls.element;
       // Post-order traversal ensures we visit the subclasses before their
       // superclass.  This makes it easy to tell if a class is needed because a
       // subclass is needed.
@@ -132,7 +141,7 @@
       } else if (extensionPoints.containsKey(cls)) {
         needed = true;
       }
-      if (backend.isJsInterop(classElement)) {
+      if (backend.isJsInteropClass(classElement)) {
         needed = true; // TODO(jacobr): we don't need all interop classes.
       } else if (cls.isNative &&
           backend.nativeData.hasNativeTagsForcedNonLeaf(classElement)) {
@@ -154,7 +163,8 @@
 
     for (Class cls in classes) {
       if (!cls.isNative) continue;
-      if (backend.isJsInterop(cls.element)) continue;
+      ClassEntity element = cls.element;
+      if (backend.isJsInteropClass(element)) continue;
       List<String> nativeTags =
           backend.nativeData.getNativeTagsOfClass(cls.element);
 
@@ -253,23 +263,21 @@
   }
 
   void potentiallyConvertDartClosuresToJs(List<jsAst.Statement> statements,
-      FunctionElement member, List<jsAst.Parameter> stubParameters) {
-    FunctionSignature parameters = member.functionSignature;
-    Element converter = helpers.closureConverter;
+      FunctionEntity member, List<jsAst.Parameter> stubParameters) {
+    FunctionEntity converter = helpers.closureConverter;
     jsAst.Expression closureConverter =
         emitterTask.staticFunctionAccess(converter);
-    parameters.forEachParameter((ParameterElement parameter) {
-      String name = parameter.name;
+    worldBuilder.forEachParameter(member, (DartType type, String name) {
       // If [name] is not in [stubParameters], then the parameter is an optional
       // parameter that was not provided for this stub.
       for (jsAst.Parameter stubParameter in stubParameters) {
         if (stubParameter.name == name) {
-          ResolutionDartType type = parameter.type.unaliased;
-          if (type is ResolutionFunctionType) {
+          type = type.unaliased;
+          if (type.isFunctionType) {
             // The parameter type is a function type either directly or through
             // typedef(s).
-            ResolutionFunctionType functionType = type;
-            int arity = functionType.computeArity();
+            FunctionType functionType = type;
+            int arity = functionType.parameterTypes.length;
             statements.add(js
                 .statement('# = #(#, $arity)', [name, closureConverter, name]));
             break;
@@ -280,7 +288,7 @@
   }
 
   List<jsAst.Statement> generateParameterStubStatements(
-      FunctionElement member,
+      FunctionEntity member,
       bool isInterceptedMethod,
       jsAst.Name invocationName,
       List<jsAst.Parameter> stubParameters,
@@ -316,7 +324,7 @@
       assert(invariant(member, member.isStatic));
       arguments = argumentsBuffer.sublist(
           0, indexOfLastOptionalArgumentInParameters + 1);
-      if (backend.isJsInterop(member)) {
+      if (backend.isJsInteropMethod(member)) {
         // fixedBackendPath is allowed to have the form foo.bar.baz for
         // interop. This template is uncached to avoid possibly running out of
         // memory when Dart2Js is run in server mode. In reality the risk of
@@ -324,7 +332,8 @@
         // and library that uses typed JavaScript interop will create only 1
         // unique template.
         receiver = js
-            .uncachedExpressionTemplate(backend.namer.fixedBackendPath(member))
+            .uncachedExpressionTemplate(
+                backend.namer.fixedBackendMethodPath(member))
             .instantiate([]);
       } else {
         receiver = js('this');
@@ -336,7 +345,7 @@
     return statements;
   }
 
-  bool isSupertypeOfNativeClass(ClassElement element) {
+  bool isSupertypeOfNativeClass(ClassEntity element) {
     if (backend.classesMixedIntoInterceptedClasses.contains(element)) {
       return true;
     }
@@ -344,15 +353,14 @@
     return subtypes[element] != null;
   }
 
-  bool requiresNativeIsCheck(Element element) {
+  bool requiresNativeIsCheck(ClassEntity element) {
     // TODO(sra): Remove this function.  It determines if a native type may
     // satisfy a check against [element], in which case an interceptor must be
     // used.  We should also use an interceptor if the check can't be satisfied
     // by a native class in case we get a native instance that tries to spoof
     // the type info.  i.e the criteria for whether or not to use an interceptor
     // is whether the receiver can be native, not the type of the test.
-    if (element == null || !element.isClass) return false;
-    ClassElement cls = element;
+    ClassEntity cls = element;
     if (backend.isNativeOrExtendsNative(cls)) return true;
     return isSupertypeOfNativeClass(element);
   }
diff --git a/pkg/compiler/lib/src/js_emitter/native_generator.dart b/pkg/compiler/lib/src/js_emitter/native_generator.dart
index 4dfa36c..b44034c 100644
--- a/pkg/compiler/lib/src/js_emitter/native_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_generator.dart
@@ -2,7 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js.js_emitter;
+library dart2js.js_emitter.native_generator;
+
+import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
+
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/js_backend.dart' show JavaScriptBackend;
+
+import 'model.dart';
 
 class NativeGenerator {
   static bool needsIsolateAffinityTagInitialization(JavaScriptBackend backend) {
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 81467cc..0e5d681 100644
--- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
@@ -2,7 +2,31 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js.js_emitter;
+library dart2js.js_emitter.parameter_stub_generator;
+
+import '../closure.dart' show ClosureClassElement;
+import '../common.dart';
+import '../compiler.dart' show Compiler;
+import '../constants/values.dart';
+import '../elements/elements.dart'
+    show
+        ClassElement,
+        FunctionElement,
+        FunctionSignature,
+        MethodElement,
+        ParameterElement;
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/js_backend.dart'
+    show JavaScriptBackend, JavaScriptConstantCompiler, Namer;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/world_builder.dart' show SelectorConstraints;
+import '../world.dart' show ClosedWorld;
+
+import 'model.dart';
+
+import 'code_emitter_task.dart' show CodeEmitterTask, Emitter;
 
 class ParameterStubGenerator {
   static final Set<Selector> emptySelectorSet = new Set<Selector>();
@@ -39,7 +63,7 @@
    * the input selector is non-null (and the member needs a stub).
    */
   ParameterStubMethod generateParameterStub(
-      FunctionElement member, Selector selector, Selector callSelector) {
+      MethodElement member, Selector selector, Selector callSelector) {
     CallStructure callStructure = selector.callStructure;
     FunctionSignature parameters = member.functionSignature;
     int positionalArgumentCount = callStructure.positionalArgumentCount;
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 287c465..79eff9a 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
@@ -24,10 +24,12 @@
         FunctionSignature,
         GetterElement,
         LibraryElement,
+        MemberElement,
         MethodElement,
         ParameterElement,
         TypedefElement,
         VariableElement;
+import '../../elements/types.dart' show DartType;
 import '../../js/js.dart' as js;
 import '../../js_backend/backend_helpers.dart' show BackendHelpers;
 import '../../js_backend/js_backend.dart'
@@ -230,9 +232,10 @@
   js.Statement _buildInvokeMain() {
     if (_compiler.isMockCompilation) return js.js.comment("Mock compilation");
 
-    MainCallStubGenerator generator =
-        new MainCallStubGenerator(_compiler, backend, backend.emitter);
-    return generator.generateInvokeMain();
+    MainCallStubGenerator generator = new MainCallStubGenerator(
+        backend, backend.emitter,
+        hasIncrementalSupport: _compiler.options.hasIncrementalSupport);
+    return generator.generateInvokeMain(_compiler.mainFunction);
   }
 
   DeferredFragment _buildDeferredFragment(LibrariesMap librariesMap) {
@@ -289,7 +292,7 @@
       LibrariesMap librariesMap) {
     JavaScriptConstantCompiler handler = backend.constants;
     DeferredLoadTask loadTask = _compiler.deferredLoadTask;
-    Iterable<VariableElement> lazyFields = handler
+    Iterable<FieldElement> lazyFields = handler
         .getLazilyInitializedFieldsForEmission()
         .where((element) =>
             loadTask.outputUnitForElement(element) == librariesMap.outputUnit);
@@ -300,7 +303,7 @@
         .toList(growable: false);
   }
 
-  StaticField _buildLazyField(Element element) {
+  StaticField _buildLazyField(FieldElement element) {
     js.Expression code = backend.generatedCode[element];
     // The code is null if we ended up not needing the lazily
     // initialized field after all because of constant folding
@@ -394,8 +397,8 @@
                 if (returnType.isFunctionType) {
                   functionType = returnType;
                 } else if (returnType.treatAsDynamic ||
-                    _compiler.types.isSubtype(
-                        returnType, backend.commonElements.functionType)) {
+                    _compiler.types.isSubtype(returnType,
+                        backend.commonElements.functionType as DartType)) {
                   if (returnType.isTypedef) {
                     ResolutionTypedefType typedef = returnType;
                     // TODO(jacobr): can we just use typdef.unaliased instead?
@@ -524,7 +527,7 @@
     RuntimeTypeGenerator runtimeTypeGenerator =
         new RuntimeTypeGenerator(_compiler, _task, namer);
 
-    void visitMember(ClassElement enclosing, Element member) {
+    void visitMember(ClassElement enclosing, MemberElement member) {
       assert(invariant(element, member.isDeclaration));
       assert(invariant(element, element == enclosing));
 
@@ -602,7 +605,7 @@
       for (Field field in instanceFields) {
         if (field.needsCheckedSetter) {
           assert(!field.needsUncheckedSetter);
-          Element element = field.element;
+          FieldElement element = field.element;
           js.Expression code = backend.generatedCode[element];
           assert(code != null);
           js.Name name = namer.deriveSetterName(field.accessorName);
@@ -712,6 +715,7 @@
   }
 
   DartMethod _buildMethod(MethodElement element) {
+    assert(element.isDeclaration);
     js.Name name = namer.methodPropertyName(element);
     js.Expression code = backend.generatedCode[element];
 
@@ -823,7 +827,8 @@
   ///
   /// Stub methods may have an element that can be used for code-size
   /// attribution.
-  Method _buildStubMethod(js.Name name, js.Expression code, {Element element}) {
+  Method _buildStubMethod(js.Name name, js.Expression code,
+      {MemberElement element}) {
     return new StubMethod(name, code, element: element);
   }
 
@@ -863,7 +868,7 @@
   List<Field> _buildFields(Element holder, bool visitStatics) {
     List<Field> fields = <Field>[];
     new FieldVisitor(_compiler, namer, closedWorld)
-        .visitFields(holder, visitStatics, (VariableElement field,
+        .visitFields(holder, visitStatics, (FieldElement field,
             js.Name name,
             js.Name accessorName,
             bool needsGetter,
@@ -921,7 +926,7 @@
     });
   }
 
-  StaticDartMethod _buildStaticMethod(FunctionElement element) {
+  StaticDartMethod _buildStaticMethod(MethodElement element) {
     js.Name name = namer.methodPropertyName(element);
     String holder = namer.globalObjectFor(element);
     js.Expression code = backend.generatedCode[element];
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index 362c6c3..6d4066e 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -2,7 +2,38 @@
 // for 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 dart2js.js_emitter;
+library dart2js.js_emitter.runtime_type_generator;
+
+import '../closure.dart' show ClosureClassMap, ClosureFieldElement;
+import '../common.dart';
+import '../common/names.dart' show Identifiers;
+import '../compiler.dart' show Compiler;
+import '../core_types.dart' show CommonElements;
+import '../elements/resolution_types.dart'
+    show ResolutionDartType, ResolutionFunctionType, ResolutionTypeVariableType;
+import '../elements/elements.dart'
+    show
+        ClassElement,
+        Element,
+        FunctionElement,
+        MixinApplicationElement,
+        TypeVariableElement;
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/js_backend.dart'
+    show
+        JavaScriptBackend,
+        Namer,
+        RuntimeTypes,
+        RuntimeTypesEncoder,
+        Substitution,
+        TypeCheck,
+        TypeChecks;
+import '../util/util.dart' show Setlet;
+
+import 'code_emitter_task.dart' show CodeEmitterTask;
+import 'model.dart';
+import 'type_test_registry.dart' show TypeTestRegistry;
 
 // Function signatures used in the generation of runtime type information.
 typedef void FunctionTypeSignatureEmitter(
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
index 617fea3..6fa1d3b 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -10,8 +10,9 @@
 import '../../common.dart';
 import '../../compiler.dart' show Compiler;
 import '../../constants/values.dart' show ConstantValue;
+import '../../deferred_load.dart' show OutputUnit;
 import '../../elements/elements.dart'
-    show ClassElement, Element, FieldElement, FunctionElement;
+    show ClassElement, Element, FieldElement, MethodElement;
 import '../../js/js.dart' as js;
 import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer;
 import '../../world.dart' show ClosedWorld;
@@ -102,7 +103,7 @@
   }
 
   @override
-  js.Expression isolateStaticClosureAccess(FunctionElement element) {
+  js.Expression isolateStaticClosureAccess(MethodElement element) {
     return _emitter.generateStaticClosureAccess(element);
   }
 
@@ -112,7 +113,7 @@
   }
 
   @override
-  js.PropertyAccess staticFunctionAccess(FunctionElement element) {
+  js.PropertyAccess staticFunctionAccess(MethodElement element) {
     return _globalPropertyAccess(element);
   }
 
@@ -145,8 +146,8 @@
 
     switch (builtin) {
       case JsBuiltin.dartObjectConstructor:
-        return js.js.expressionTemplateYielding(
-            typeAccess(_compiler.commonElements.objectClass));
+        ClassElement objectClass = _compiler.commonElements.objectClass;
+        return js.js.expressionTemplateYielding(typeAccess(objectClass));
 
       case JsBuiltin.isCheckPropertyToJsConstructorName:
         int isPrefixLength = namer.operatorIsPrefix.length;
@@ -195,5 +196,12 @@
   }
 
   @override
+  int generatedSize(OutputUnit unit) {
+    Fragment key = _emitter.outputBuffers.keys
+        .firstWhere((Fragment fragment) => fragment.outputUnit == unit);
+    return _emitter.outputBuffers[key].length;
+  }
+
+  @override
   void invalidateCaches() {}
 }
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 9f67aa9..bd3a080 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
@@ -171,7 +171,7 @@
 function convertToFastObject(properties) {
   // Create an instance that uses 'properties' as prototype. This should
   // make 'properties' a fast object.
-  function t() {};
+  function t() {}
   t.prototype = properties;
   new t();
   return properties;
@@ -563,11 +563,21 @@
     for (Library library in fragment.libraries) {
       for (StaticMethod method in library.statics) {
         assert(!method.holder.isStaticStateHolder);
-        holderCode[method.holder].addAll(emitStaticMethod(method));
+        var staticMethod = emitStaticMethod(method);
+        if (compiler.options.dumpInfo) {
+          for (var code in staticMethod.values) {
+            compiler.dumpInfoTask.registerElementAst(method.element, code);
+            compiler.dumpInfoTask.registerElementAst(library.element, code);
+          }
+        }
+        holderCode[method.holder].addAll(staticMethod);
       }
       for (Class cls in library.classes) {
         assert(!cls.holder.isStaticStateHolder);
-        holderCode[cls.holder][cls.name] = emitConstructor(cls);
+        var constructor = emitConstructor(cls);
+        compiler.dumpInfoTask.registerElementAst(cls.element, constructor);
+        compiler.dumpInfoTask.registerElementAst(library.element, constructor);
+        holderCode[cls.holder][cls.name] = constructor;
       }
     }
 
@@ -668,9 +678,14 @@
   js.Statement emitPrototypes(Fragment fragment) {
     List<js.Statement> assignments = fragment.libraries
         .expand((Library library) => library.classes)
-        .map((Class cls) => js.js.statement(
-            '#.prototype = #;', [classReference(cls), emitPrototype(cls)]))
-        .toList(growable: false);
+        .map((Class cls) {
+      var proto = js.js.statement(
+          '#.prototype = #;', [classReference(cls), emitPrototype(cls)]);
+      ClassElement element = cls.element;
+      compiler.dumpInfoTask.registerElementAst(element, proto);
+      compiler.dumpInfoTask.registerElementAst(element.library, proto);
+      return proto;
+    }).toList(growable: false);
 
     return new js.Block(assignments);
   }
@@ -712,7 +727,9 @@
     allMethods.forEach((Method method) {
       emitInstanceMethod(method)
           .forEach((js.Expression name, js.Expression code) {
-        properties.add(new js.Property(name, code));
+        var prop = new js.Property(name, code);
+        compiler.dumpInfoTask.registerElementAst(method.element, prop);
+        properties.add(prop);
       });
     });
 
@@ -948,7 +965,8 @@
 
     bool isIntercepted = false;
     if (method is InstanceMethod) {
-      isIntercepted = backend.isInterceptedMethod(method.element);
+      MethodElement element = method.element;
+      isIntercepted = backend.isInterceptedMethod(element);
     }
     int requiredParameterCount = 0;
     js.Expression optionalParameterDefaultValues = new js.LiteralNull();
@@ -1011,11 +1029,13 @@
       // find the constants that don't have any dependency on other constants
       // and create an object-literal with them (and assign it to the
       // constant-holder variable).
-      assignments.add(js.js.statement('#.# = #', [
+      var assignment = js.js.statement('#.# = #', [
         constant.holder.name,
         constant.name,
         constantEmitter.generate(constant.value)
-      ]));
+      ]);
+      compiler.dumpInfoTask.registerConstantAst(constant.value, assignment);
+      assignments.add(assignment);
     }
     return new js.Block(assignments);
   }
diff --git a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
index ffd3b55..15f3b55 100644
--- a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
@@ -2,7 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js.js_emitter;
+library dart2js.js_emitter.type_test_registry;
+
+import '../compiler.dart' show Compiler;
+import '../elements/resolution_types.dart'
+    show
+        ResolutionDartType,
+        ResolutionFunctionType,
+        ResolutionInterfaceType,
+        Types,
+        ResolutionTypeVariableType;
+import '../elements/elements.dart'
+    show ClassElement, Element, ElementKind, FunctionElement;
+import '../js_backend/js_backend.dart'
+    show JavaScriptBackend, RuntimeTypes, TypeChecks;
+import '../world.dart' show ClosedWorld;
 
 class TypeTestRegistry {
   /**
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
index 831eff4..1bb66cc 100644
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
@@ -909,8 +909,8 @@
   @override
   ir.Expression visitLiteralString(LiteralString node) {
     if (node.dartString == null) return new ir.InvalidExpression();
-    return associateNode(new ir.StringLiteral(node.dartString.slowToString()),
-        node);
+    return associateNode(
+        new ir.StringLiteral(node.dartString.slowToString()), node);
   }
 
   @override
@@ -1109,9 +1109,7 @@
     ir.Statement body =
         buildContinueTarget(buildStatementInBlock(node.body), node, jumpTarget);
     return buildBreakTarget(
-        associateNode(new ir.WhileStatement(condition, body), node),
-        node,
-        jumpTarget);
+        new ir.WhileStatement(condition, body), node, jumpTarget);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index 4aa5ba0..2b804bd 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -10,9 +10,10 @@
 import '../compiler.dart' show Compiler;
 import '../constants/values.dart';
 import '../core_types.dart' show CommonElements;
-import '../elements/resolution_types.dart';
 import '../elements/elements.dart';
+import '../elements/entities.dart';
 import '../elements/modelx.dart' show FunctionElementX;
+import '../elements/resolution_types.dart';
 import '../js_backend/backend_helpers.dart' show BackendHelpers;
 import '../js_backend/js_backend.dart';
 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
@@ -635,9 +636,9 @@
     // be instantiated (abstract or simply unused).
     _addSubtypes(cls.superclass, emitter);
 
-    for (ResolutionDartType type in cls.allSupertypes) {
-      List<Element> subtypes =
-          emitter.subtypes.putIfAbsent(type.element, () => <ClassElement>[]);
+    for (ResolutionInterfaceType type in cls.allSupertypes) {
+      List<ClassEntity> subtypes =
+          emitter.subtypes.putIfAbsent(type.element, () => <ClassEntity>[]);
       subtypes.add(cls);
     }
 
@@ -650,8 +651,8 @@
       superclass = superclass.superclass;
     }
 
-    List<Element> directSubtypes =
-        emitter.directSubtypes.putIfAbsent(superclass, () => <ClassElement>[]);
+    List<ClassEntity> directSubtypes =
+        emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]);
     directSubtypes.add(cls);
   }
 
diff --git a/pkg/compiler/lib/src/native/ssa.dart b/pkg/compiler/lib/src/native/ssa.dart
index e0839a0..20d1ee3 100644
--- a/pkg/compiler/lib/src/native/ssa.dart
+++ b/pkg/compiler/lib/src/native/ssa.dart
@@ -28,7 +28,7 @@
       ParameterElement parameter, ResolutionFunctionType type) {
     HInstruction local = builder.localsHandler.readLocal(parameter);
     ConstantValue arityConstant =
-        builder.constantSystem.createInt(type.computeArity());
+        builder.constantSystem.createInt(type.parameterTypes.length);
     HInstruction arity =
         builder.graph.addConstant(arityConstant, builder.closedWorld);
     // TODO(ngeoffray): For static methods, we could pass a method with a
diff --git a/pkg/compiler/lib/src/resolution/class_hierarchy.dart b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
index 2544cb4..c260b99 100644
--- a/pkg/compiler/lib/src/resolution/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
@@ -41,7 +41,7 @@
 
   CommonElements get commonElements => resolution.commonElements;
 
-  ResolutionDartType get objectType => commonElements.objectType;
+  ResolutionInterfaceType get objectType => commonElements.objectType;
 
   void resolveTypeVariableBounds(NodeList node) {
     if (node == null) return;
diff --git a/pkg/compiler/lib/src/resolution/enum_creator.dart b/pkg/compiler/lib/src/resolution/enum_creator.dart
index 5fd1a68..c73a926 100644
--- a/pkg/compiler/lib/src/resolution/enum_creator.dart
+++ b/pkg/compiler/lib/src/resolution/enum_creator.dart
@@ -282,7 +282,8 @@
 
     VariableList valuesVariableList =
         new VariableList(builder.modifiers(isStatic: true, isConst: true));
-    valuesVariableList.type = commonElements.listType(enumType);
+    ResolutionInterfaceType valuesType = commonElements.listType(enumType);
+    valuesVariableList.type = valuesType;
 
     Identifier valuesIdentifier = builder.identifier('values');
     // TODO(johnniwinther): Add type argument.
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 844f0b0..13bcdd9 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -336,7 +336,8 @@
       if (Elements.isUnresolved(element) && name == 'dynamic') {
         // TODO(johnniwinther): Remove this hack when we can return more complex
         // objects than [Element] from this method.
-        element = commonElements.typeClass;
+        ClassElement typeClass = commonElements.typeClass;
+        element = typeClass;
         // Set the type to be `dynamic` to mark that this is a type literal.
         registry.setType(node, const ResolutionDynamicType());
       }
@@ -1180,8 +1181,9 @@
         // TODO(johnniwinther): Add information to [AccessSemantics] about
         // whether it is erroneous.
         if (semantics.kind == AccessKind.SUPER_METHOD) {
-          registry.registerStaticUse(new StaticUse.superInvoke(
-              semantics.element.declaration, selector.callStructure));
+          MethodElement superMethod = semantics.element.declaration;
+          registry.registerStaticUse(
+              new StaticUse.superInvoke(superMethod, selector.callStructure));
         }
         // TODO(23998): Remove this when all information goes through
         // the [SendStructure].
@@ -1354,8 +1356,9 @@
         // TODO(johnniwinther): Add information to [AccessSemantics] about
         // whether it is erroneous.
         if (semantics.kind == AccessKind.SUPER_METHOD) {
-          registry.registerStaticUse(new StaticUse.superInvoke(
-              semantics.element.declaration, selector.callStructure));
+          MethodElement superMethod = semantics.element.declaration;
+          registry.registerStaticUse(
+              new StaticUse.superInvoke(superMethod, selector.callStructure));
         }
         // TODO(23998): Remove this when all information goes through
         // the [SendStructure].
@@ -1573,13 +1576,14 @@
             isIncompatibleInvoke = true;
           } else {
             registry.registerStaticUse(
-                new StaticUse.superInvoke(semantics.element, callStructure));
+                new StaticUse.superInvoke(superMethod, callStructure));
           }
           break;
         case AccessKind.SUPER_FIELD:
         case AccessKind.SUPER_FINAL_FIELD:
         case AccessKind.SUPER_GETTER:
-          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
+          MemberElement superMember = semantics.element;
+          registry.registerStaticUse(new StaticUse.superGet(superMember));
           selector = callStructure.callSelector;
           registry.registerDynamicUse(new DynamicUse(selector, null));
           break;
@@ -1605,13 +1609,14 @@
         case AccessKind.SUPER_METHOD:
           // TODO(johnniwinther): Method this should be registered as a
           // closurization.
-          registry
-              .registerStaticUse(new StaticUse.superTearOff(semantics.element));
+          MethodElement superMethod = semantics.element;
+          registry.registerStaticUse(new StaticUse.superTearOff(superMethod));
           break;
         case AccessKind.SUPER_FIELD:
         case AccessKind.SUPER_FINAL_FIELD:
         case AccessKind.SUPER_GETTER:
-          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
+          MemberElement superMember = semantics.element;
+          registry.registerStaticUse(new StaticUse.superGet(superMember));
           break;
         case AccessKind.SUPER_SETTER:
         case AccessKind.UNRESOLVED_SUPER:
@@ -2081,8 +2086,9 @@
         // directly on the constant expressions.
         node.isCall ? commonElements.typeType : type);
     AccessSemantics semantics = new ConstantAccess.dynamicTypeLiteral(constant);
-    return handleConstantTypeLiteralAccess(node, const PublicName('dynamic'),
-        commonElements.typeClass, type, semantics);
+    ClassElement typeClass = commonElements.typeClass;
+    return handleConstantTypeLiteralAccess(
+        node, const PublicName('dynamic'), typeClass, type, semantics);
   }
 
   /// Handle update to a type literal of the type 'dynamic'. Like `dynamic++` or
@@ -2092,8 +2098,9 @@
     ConstantExpression constant =
         new TypeConstantExpression(const ResolutionDynamicType());
     AccessSemantics semantics = new ConstantAccess.dynamicTypeLiteral(constant);
-    return handleConstantTypeLiteralUpdate(node, const PublicName('dynamic'),
-        commonElements.typeClass, type, semantics);
+    ClassElement typeClass = commonElements.typeClass;
+    return handleConstantTypeLiteralUpdate(
+        node, const PublicName('dynamic'), typeClass, type, semantics);
   }
 
   /// Handle access to a type literal of a class. Like `C` or
@@ -2668,7 +2675,7 @@
             isIncompatibleInvoke = true;
           } else {
             registry.registerStaticUse(
-                new StaticUse.staticInvoke(semantics.element, callStructure));
+                new StaticUse.staticInvoke(method, callStructure));
             handleForeignCall(node, semantics.element, callStructure);
             if (method == resolution.commonElements.identicalFunction &&
                 argumentsResult.isValidAsConstant) {
@@ -2686,8 +2693,8 @@
         case AccessKind.TOPLEVEL_FIELD:
         case AccessKind.FINAL_TOPLEVEL_FIELD:
         case AccessKind.TOPLEVEL_GETTER:
-          registry
-              .registerStaticUse(new StaticUse.staticGet(semantics.element));
+          MemberElement member = semantics.element;
+          registry.registerStaticUse(new StaticUse.staticGet(member));
           selector = callStructure.callSelector;
           registry.registerDynamicUse(new DynamicUse(selector, null));
           break;
@@ -2713,8 +2720,8 @@
       switch (semantics.kind) {
         case AccessKind.STATIC_METHOD:
         case AccessKind.TOPLEVEL_METHOD:
-          registry.registerStaticUse(
-              new StaticUse.staticTearOff(semantics.element));
+          MethodElement method = semantics.element;
+          registry.registerStaticUse(new StaticUse.staticTearOff(method));
           break;
         case AccessKind.STATIC_FIELD:
         case AccessKind.FINAL_STATIC_FIELD:
@@ -2722,8 +2729,8 @@
         case AccessKind.TOPLEVEL_FIELD:
         case AccessKind.FINAL_TOPLEVEL_FIELD:
         case AccessKind.TOPLEVEL_GETTER:
-          registry
-              .registerStaticUse(new StaticUse.staticGet(semantics.element));
+          MemberElement member = semantics.element;
+          registry.registerStaticUse(new StaticUse.staticGet(member));
           break;
         case AccessKind.STATIC_SETTER:
         case AccessKind.TOPLEVEL_SETTER:
@@ -2833,16 +2840,17 @@
         semantics = new StaticAccess.unresolved(member);
       } else if (member.isFunction) {
         // `a = b`, `a++` or `a += b` where `a` is a function.
+        MethodElement method = member;
         ErroneousElement error = reportAndCreateErroneousElement(
             node.selector, name.text, MessageKind.ASSIGNING_METHOD, const {});
         registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
         if (node.isComplex) {
           // `a++` or `a += b` where `a` is a function.
-          registry.registerStaticUse(new StaticUse.staticTearOff(element));
+          registry.registerStaticUse(new StaticUse.staticTearOff(method));
         }
         semantics = member.isTopLevel
-            ? new StaticAccess.topLevelMethod(member)
-            : new StaticAccess.staticMethod(member);
+            ? new StaticAccess.topLevelMethod(method)
+            : new StaticAccess.staticMethod(method);
       } else {
         // `a = b`, `a++` or `a += b` where `a` is a field.
         assert(invariant(node, member.isField,
@@ -3168,12 +3176,14 @@
             isIndex: true);
 
         if (!semantics.getter.isError) {
-          registry.registerStaticUse(new StaticUse.superInvoke(
-              semantics.getter, getterSelector.callStructure));
+          MethodElement getter = semantics.getter;
+          registry.registerStaticUse(
+              new StaticUse.superInvoke(getter, getterSelector.callStructure));
         }
         if (!semantics.setter.isError) {
-          registry.registerStaticUse(new StaticUse.superInvoke(
-              semantics.setter, setterSelector.callStructure));
+          MethodElement setter = semantics.setter;
+          registry.registerStaticUse(
+              new StaticUse.superInvoke(setter, setterSelector.callStructure));
         }
 
         // TODO(23998): Remove these when elements are only accessed
@@ -3209,8 +3219,9 @@
         // through the send structure.
         registry.setSelector(node, setterSelector);
         if (!semantics.setter.isError) {
-          registry.registerStaticUse(new StaticUse.superInvoke(
-              semantics.setter, setterSelector.callStructure));
+          MethodElement setter = semantics.setter;
+          registry.registerStaticUse(
+              new StaticUse.superInvoke(setter, setterSelector.callStructure));
         }
 
         SendStructure sendStructure = new IndexSetStructure(semantics);
@@ -3228,12 +3239,14 @@
               isIndex: true);
 
           if (!semantics.getter.isError) {
+            MethodElement getter = semantics.getter;
             registry.registerStaticUse(new StaticUse.superInvoke(
-                semantics.getter, getterSelector.callStructure));
+                getter, getterSelector.callStructure));
           }
           if (!semantics.setter.isError) {
+            MethodElement setter = semantics.setter;
             registry.registerStaticUse(new StaticUse.superInvoke(
-                semantics.setter, setterSelector.callStructure));
+                setter, setterSelector.callStructure));
           }
 
           // TODO(23998): Remove these when elements are only accessed
@@ -3276,52 +3289,54 @@
     void registerStaticUses(AccessSemantics semantics) {
       switch (semantics.kind) {
         case AccessKind.SUPER_METHOD:
-          registry
-              .registerStaticUse(new StaticUse.superTearOff(semantics.element));
+          MethodElement method = semantics.element;
+          registry.registerStaticUse(new StaticUse.superTearOff(method));
           break;
         case AccessKind.SUPER_GETTER:
-          registry.registerStaticUse(new StaticUse.superGet(semantics.getter));
+          MethodElement getter = semantics.getter;
+          registry.registerStaticUse(new StaticUse.superGet(getter));
           break;
         case AccessKind.SUPER_SETTER:
-          registry.registerStaticUse(
-              new StaticUse.superSetterSet(semantics.setter));
+          MethodElement setter = semantics.setter;
+          registry.registerStaticUse(new StaticUse.superSetterSet(setter));
           break;
         case AccessKind.SUPER_FIELD:
-          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
-          registry.registerStaticUse(
-              new StaticUse.superFieldSet(semantics.element));
+          FieldElement field = semantics.element;
+          registry.registerStaticUse(new StaticUse.superGet(field));
+          registry.registerStaticUse(new StaticUse.superFieldSet(field));
           break;
         case AccessKind.SUPER_FINAL_FIELD:
-          registry.registerStaticUse(new StaticUse.superGet(semantics.element));
+          FieldElement field = semantics.element;
+          registry.registerStaticUse(new StaticUse.superGet(field));
           break;
         case AccessKind.COMPOUND:
           CompoundAccessSemantics compoundSemantics = semantics;
           switch (compoundSemantics.compoundAccessKind) {
             case CompoundAccessKind.SUPER_GETTER_FIELD:
             case CompoundAccessKind.SUPER_FIELD_FIELD:
-              registry
-                  .registerStaticUse(new StaticUse.superGet(semantics.getter));
-              registry.registerStaticUse(
-                  new StaticUse.superFieldSet(semantics.setter));
+              MemberElement getter = semantics.getter;
+              FieldElement setter = semantics.setter;
+              registry.registerStaticUse(new StaticUse.superGet(getter));
+              registry.registerStaticUse(new StaticUse.superFieldSet(setter));
               break;
             case CompoundAccessKind.SUPER_FIELD_SETTER:
             case CompoundAccessKind.SUPER_GETTER_SETTER:
-              registry
-                  .registerStaticUse(new StaticUse.superGet(semantics.getter));
-              registry.registerStaticUse(
-                  new StaticUse.superSetterSet(semantics.setter));
+              MemberElement getter = semantics.getter;
+              MethodElement setter = semantics.setter;
+              registry.registerStaticUse(new StaticUse.superGet(getter));
+              registry.registerStaticUse(new StaticUse.superSetterSet(setter));
               break;
             case CompoundAccessKind.SUPER_METHOD_SETTER:
-              registry.registerStaticUse(
-                  new StaticUse.superSetterSet(semantics.setter));
+              MethodElement setter = semantics.setter;
+              registry.registerStaticUse(new StaticUse.superSetterSet(setter));
               break;
             case CompoundAccessKind.UNRESOLVED_SUPER_GETTER:
-              registry.registerStaticUse(
-                  new StaticUse.superSetterSet(semantics.setter));
+              MethodElement setter = semantics.setter;
+              registry.registerStaticUse(new StaticUse.superSetterSet(setter));
               break;
             case CompoundAccessKind.UNRESOLVED_SUPER_SETTER:
-              registry
-                  .registerStaticUse(new StaticUse.superGet(semantics.getter));
+              MethodElement getter = semantics.getter;
+              registry.registerStaticUse(new StaticUse.superGet(getter));
               break;
             default:
               break;
@@ -3371,12 +3386,12 @@
               registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
               break;
             case AccessKind.SUPER_FIELD:
-              registry.registerStaticUse(
-                  new StaticUse.superFieldSet(semantics.setter));
+              FieldElement field = semantics.setter;
+              registry.registerStaticUse(new StaticUse.superFieldSet(field));
               break;
             case AccessKind.SUPER_SETTER:
-              registry.registerStaticUse(
-                  new StaticUse.superSetterSet(semantics.setter));
+              MethodElement setter = semantics.setter;
+              registry.registerStaticUse(new StaticUse.superSetterSet(setter));
               break;
             default:
               break;
@@ -3603,11 +3618,13 @@
       if (!currentAsyncMarker.isYielding) {
         reporter.reportErrorMessage(node, MessageKind.INVALID_YIELD);
       }
+      ClassElement cls;
       if (currentAsyncMarker.isAsync) {
-        commonElements.streamClass.ensureResolved(resolution);
+        cls = commonElements.streamClass;
       } else {
-        commonElements.iterableClass.ensureResolved(resolution);
+        cls = commonElements.iterableClass;
       }
+      cls.ensureResolved(resolution);
     }
     visit(node.expression);
     return const NoneResult();
@@ -3742,7 +3759,8 @@
       if (!currentAsyncMarker.isAsync) {
         reporter.reportErrorMessage(node, MessageKind.INVALID_AWAIT);
       }
-      commonElements.futureClass.ensureResolved(resolution);
+      ClassElement futureClass = commonElements.futureClass;
+      futureClass.ensureResolved(resolution);
     }
     visit(node.expression);
     return const NoneResult();
@@ -3902,11 +3920,12 @@
       // and only declaration elements may be registered.
       // TODO(johniwinther): Avoid registration of `type` in face of redirecting
       // factory constructors.
+      ConstructorElement declaration = constructor.declaration;
       registry.registerStaticUse(node.isConst
           ? new StaticUse.constConstructorInvoke(
-              constructor.declaration, callStructure, type)
+              declaration, callStructure, type)
           : new StaticUse.typedConstructorInvoke(
-              constructor.declaration, callStructure, type));
+              constructor, callStructure, type));
       ResolutionInterfaceType interfaceType = type;
       if (interfaceType.typeArguments
           .any((ResolutionDartType type) => !type.isDynamic)) {
@@ -4122,7 +4141,7 @@
         }
       }
     }
-    ResolutionDartType listType;
+    ResolutionInterfaceType listType;
     if (typeArgument != null) {
       if (node.isConst && typeArgument.containsTypeVariables) {
         reporter.reportErrorMessage(
@@ -4351,8 +4370,8 @@
       if (loopVariable == null || loopVariable.isInstanceMember) {
         registry.registerDynamicUse(new DynamicUse(loopVariableSelector, null));
       } else if (loopVariable.isStatic || loopVariable.isTopLevel) {
-        registry.registerStaticUse(
-            new StaticUse.staticSet(loopVariable.declaration));
+        MemberElement member = loopVariable.declaration;
+        registry.registerStaticUse(new StaticUse.staticSet(member));
       }
     } else {
       // The selector may only be null if we reported an error.
@@ -4425,7 +4444,7 @@
         }
       }
     }
-    ResolutionDartType mapType;
+    ResolutionInterfaceType mapType;
     if (valueTypeArgument != null) {
       mapType = commonElements.mapType(keyTypeArgument, valueTypeArgument);
     } else {
@@ -4480,7 +4499,7 @@
     return visit(node.expression);
   }
 
-  ResolutionDartType typeOfConstant(ConstantValue constant) {
+  ResolutionInterfaceType typeOfConstant(ConstantValue constant) {
     if (constant.isInt) return commonElements.intType;
     if (constant.isBool) return commonElements.boolType;
     if (constant.isDouble) return commonElements.doubleType;
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index 3210976..b844779 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -184,20 +184,22 @@
                 {'modifier': element.asyncMarker});
           }
         }
+        ClassElement cls;
         switch (element.asyncMarker) {
           case AsyncMarker.ASYNC:
             registry.registerFeature(Feature.ASYNC);
-            commonElements.futureClass.ensureResolved(resolution);
+            cls = commonElements.futureClass;
             break;
           case AsyncMarker.ASYNC_STAR:
             registry.registerFeature(Feature.ASYNC_STAR);
-            commonElements.streamClass.ensureResolved(resolution);
+            cls = commonElements.streamClass;
             break;
           case AsyncMarker.SYNC_STAR:
             registry.registerFeature(Feature.SYNC_STAR);
-            commonElements.iterableClass.ensureResolved(resolution);
+            cls = commonElements.iterableClass;
             break;
         }
+        cls?.ensureResolved(resolution);
       }
     }
   }
@@ -541,8 +543,8 @@
             from, MessageKind.CYCLIC_CLASS_HIERARCHY, {'className': cls.name});
         cls.supertypeLoadState = STATE_DONE;
         cls.hasIncompleteHierarchy = true;
-        cls.allSupertypesAndSelf = commonElements
-            .objectClass.allSupertypesAndSelf
+        ClassElement objectClass = commonElements.objectClass;
+        cls.allSupertypesAndSelf = objectClass.allSupertypesAndSelf
             .extendClass(cls.computeType(resolution));
         cls.supertype = cls.allSupertypes.head;
         assert(invariant(from, cls.supertype != null,
diff --git a/pkg/compiler/lib/src/resolution/signatures.dart b/pkg/compiler/lib/src/resolution/signatures.dart
index ae39454..07f3bba 100644
--- a/pkg/compiler/lib/src/resolution/signatures.dart
+++ b/pkg/compiler/lib/src/resolution/signatures.dart
@@ -390,13 +390,19 @@
           returnType = visitor.resolveReturnType(returnNode);
           break;
         case AsyncMarker.SYNC_STAR:
-          returnType = resolution.commonElements.iterableType();
+          ResolutionInterfaceType iterableType =
+              resolution.commonElements.iterableType();
+          returnType = iterableType;
           break;
         case AsyncMarker.ASYNC:
-          returnType = resolution.commonElements.futureType();
+          ResolutionInterfaceType futureType =
+              resolution.commonElements.futureType();
+          returnType = futureType;
           break;
         case AsyncMarker.ASYNC_STAR:
-          returnType = resolution.commonElements.streamType();
+          ResolutionInterfaceType streamType =
+              resolution.commonElements.streamType();
+          returnType = streamType;
           break;
       }
     }
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 24feb36..b49d87e6 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -798,53 +798,6 @@
   }
 
   /**
-   * Returns the constructor body associated with the given constructor or
-   * creates a new constructor body, if none can be found.
-   *
-   * Returns [:null:] if the constructor does not have a body.
-   */
-  ConstructorBodyElement getConstructorBody(
-      ResolvedAst constructorResolvedAst) {
-    ConstructorElement constructor =
-        constructorResolvedAst.element.implementation;
-    assert(constructor.isGenerativeConstructor);
-    if (constructorResolvedAst.kind != ResolvedAstKind.PARSED) return null;
-
-    ast.FunctionExpression node = constructorResolvedAst.node;
-    // If we know the body doesn't have any code, we don't generate it.
-    if (!node.hasBody) return null;
-    if (node.hasEmptyBody) return null;
-    ClassElement classElement = constructor.enclosingClass;
-    ConstructorBodyElement bodyElement;
-    classElement.forEachBackendMember((Element backendMember) {
-      if (backendMember.isGenerativeConstructorBody) {
-        ConstructorBodyElement body = backendMember;
-        if (body.constructor == constructor) {
-          // TODO(kasperl): Find a way of stopping the iteration
-          // through the backend members.
-          bodyElement = backendMember;
-        }
-      }
-    });
-    if (bodyElement == null) {
-      bodyElement =
-          new ConstructorBodyElementX(constructorResolvedAst, constructor);
-      classElement.addBackendMember(bodyElement);
-
-      if (constructor.isPatch) {
-        // Create origin body element for patched constructors.
-        ConstructorBodyElementX patch = bodyElement;
-        ConstructorBodyElementX origin = new ConstructorBodyElementX(
-            constructorResolvedAst, constructor.origin);
-        origin.applyPatch(patch);
-        classElement.origin.addBackendMember(bodyElement.origin);
-      }
-    }
-    assert(bodyElement.isGenerativeConstructorBody);
-    return bodyElement;
-  }
-
-  /**
    * This method sets up the local state of the builder for inlining [function].
    * The arguments of the function are inserted into the [localsHandler].
    *
@@ -1351,7 +1304,8 @@
     HInstruction interceptor = null;
     for (int index = constructorResolvedAsts.length - 1; index >= 0; index--) {
       ResolvedAst constructorResolvedAst = constructorResolvedAsts[index];
-      ConstructorBodyElement body = getConstructorBody(constructorResolvedAst);
+      ConstructorBodyElement body =
+          ConstructorBodyElementX.createFromResolvedAst(constructorResolvedAst);
       if (body == null) continue;
 
       List bodyCallInputs = <HInstruction>[];
@@ -1563,8 +1517,8 @@
   HInstruction popBoolified() {
     HInstruction value = pop();
     if (typeBuilder.checkOrTrustTypes) {
-      return typeBuilder.potentiallyCheckOrTrustType(
-          value, compiler.commonElements.boolType,
+      ResolutionInterfaceType boolType = compiler.commonElements.boolType;
+      return typeBuilder.potentiallyCheckOrTrustType(value, boolType,
           kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK);
     }
     HInstruction result = new HBoolify(value, commonMasks.boolType);
@@ -2959,7 +2913,7 @@
       reporter.internalError(
           closure, '"$name" requires a static or top-level method.');
     }
-    FunctionElement function = element;
+    MethodElement function = element;
     // TODO(johnniwinther): Try to eliminate the need to distinguish declaration
     // and implementation signatures. Currently it is need because the
     // signatures have different elements for parameters.
@@ -3068,8 +3022,8 @@
     ClassElement cls = currentNonClosureClass;
     MethodElement element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
     if (!Selectors.noSuchMethod_.signatureApplies(element)) {
-      element =
-          commonElements.objectClass.lookupMember(Identifiers.noSuchMethod_);
+      ClassElement objectClass = commonElements.objectClass;
+      element = objectClass.lookupMember(Identifiers.noSuchMethod_);
     }
     if (backend.hasInvokeOnSupport && !element.enclosingClass.isObject) {
       // Register the call as dynamic if [noSuchMethod] on the super
@@ -3623,16 +3577,9 @@
     List<HInstruction> inputs = makeStaticArgumentList(
         callStructure, node.arguments, function.implementation);
 
-    if (function == compiler.commonElements.identicalFunction) {
-      pushWithPosition(
-          new HIdentity(inputs[0], inputs[1], null, commonMasks.boolType),
-          node);
-      return;
-    } else {
-      pushInvokeStatic(node, function, inputs,
-          sourceInformation:
-              sourceInformationBuilder.buildCall(node, node.selector));
-    }
+    pushInvokeStatic(node, function, inputs,
+        sourceInformation:
+            sourceInformationBuilder.buildCall(node, node.selector));
   }
 
   /// Generate an invocation to a static or top level function with the wrong
@@ -4061,7 +4008,7 @@
     }
   }
 
-  HForeignCode invokeJsInteropFunction(FunctionElement element,
+  HForeignCode invokeJsInteropFunction(MethodElement element,
       List<HInstruction> arguments, SourceInformation sourceInformation) {
     assert(backend.isJsInterop(element));
     nativeEmitter.nativeMethods.add(element);
@@ -4104,7 +4051,7 @@
         ..sourceInformation = sourceInformation;
     }
     var target = new HForeignCode(
-        js.js.parseForeignJS("${backend.namer.fixedBackendPath(element)}."
+        js.js.parseForeignJS("${backend.namer.fixedBackendMethodPath(element)}."
             "${backend.nativeData.getFixedBackendName(element)}"),
         commonMasks.dynamicType,
         <HInstruction>[]);
@@ -5285,16 +5232,20 @@
       instruction = setRtiIfNeeded(instruction, node);
     }
 
-    TypeMask type = _inferredTypeOfNewList(node);
+    TypeMask type = _inferredTypeOfListLiteral(node);
     if (!type.containsAll(closedWorld)) {
       instruction.instructionType = type;
     }
     stack.add(instruction);
   }
 
-  _inferredTypeOfNewList(ast.Node node) =>
+  _inferredTypeOfNewList(ast.Send node) =>
       _resultOf(sourceElement).typeOfNewList(node) ?? commonMasks.dynamicType;
 
+  _inferredTypeOfListLiteral(ast.LiteralList node) =>
+      _resultOf(sourceElement).typeOfListLiteral(node) ??
+      commonMasks.dynamicType;
+
   visitConditional(ast.Conditional node) {
     SsaBranchBuilder brancher = new SsaBranchBuilder(this, compiler, node);
     brancher.handleConditional(() => visit(node.condition),
@@ -5369,7 +5320,7 @@
     if (isLoopJump && node is ast.SwitchStatement) {
       // Create a special jump handler for loops created for switch statements
       // with continue statements.
-      return new SwitchCaseJumpHandler(this, element, node);
+      return new AstSwitchCaseJumpHandler(this, element, node);
     }
     return new JumpHandler(this, element);
   }
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 223889e..84ae3a5 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -18,6 +18,7 @@
         TypeConstantValue;
 import '../elements/resolution_types.dart';
 import '../elements/elements.dart';
+import '../elements/entities.dart' show MemberEntity;
 import '../io/source_information.dart';
 import '../js/js.dart' as js;
 import '../js_backend/backend.dart' show JavaScriptBackend;
@@ -91,6 +92,7 @@
 
 class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
   ir.Node target;
+  bool _targetIsConstructorBody = false;
   final AstElement targetElement;
   final ResolvedAst resolvedAst;
   final ClosedWorld closedWorld;
@@ -156,11 +158,17 @@
       originTarget = originTarget.origin;
     }
     if (originTarget is FunctionElement) {
+      if (originTarget is ConstructorBodyElement) {
+        ConstructorBodyElement body = originTarget;
+        _targetIsConstructorBody = true;
+        originTarget = body.constructor;
+      }
       target = kernel.functions[originTarget];
       // Closures require a lookup one level deeper in the closure class mapper.
       if (target == null) {
+        FunctionElement originTargetFunction = originTarget;
         ClosureClassMap classMap = compiler.closureToClassMapper
-            .getClosureToClassMapping(originTarget.resolvedAst);
+            .getClosureToClassMapping(originTargetFunction.resolvedAst);
         if (classMap.closureElement != null) {
           target = kernel.localFunctions[classMap.closureElement];
         }
@@ -179,7 +187,11 @@
     } else if (target is ir.Field) {
       buildField(target);
     } else if (target is ir.Constructor) {
-      buildConstructor(target);
+      if (_targetIsConstructorBody) {
+        buildConstructorBody(target);
+      } else {
+        buildConstructor(target);
+      }
     } else if (target is ir.FunctionExpression) {
       _targetFunction = (target as ir.FunctionExpression).function;
       buildFunctionNode(_targetFunction);
@@ -187,7 +199,7 @@
       _targetFunction = (target as ir.FunctionDeclaration).function;
       buildFunctionNode(_targetFunction);
     } else {
-      throw 'No case implemented to handle $target';
+      throw 'No case implemented to handle target: $target';
     }
     assert(graph.isValid());
     return graph;
@@ -216,8 +228,8 @@
   HInstruction popBoolified() {
     HInstruction value = pop();
     if (typeBuilder.checkOrTrustTypes) {
-      return typeBuilder.potentiallyCheckOrTrustType(
-          value, compiler.commonElements.boolType,
+      ResolutionInterfaceType type = compiler.commonElements.boolType;
+      return typeBuilder.potentiallyCheckOrTrustType(value, type,
           kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK);
     }
     HInstruction result = new HBoolify(value, commonMasks.boolType);
@@ -261,8 +273,9 @@
     //            initializer list? If so then this is unnecessary...
     Map<ir.Field, HInstruction> fieldValues =
         _collectFieldValues(constructor.enclosingClass);
+    List<ir.Constructor> constructorChain = <ir.Constructor>[];
 
-    _buildInitializers(constructor, fieldValues);
+    _buildInitializers(constructor, constructorChain, fieldValues);
 
     final constructorArguments = <HInstruction>[];
     astAdapter.getClass(constructor.enclosingClass).forEachInstanceField(
@@ -273,7 +286,7 @@
 
     // TODO(het): If the class needs runtime type information, add it as a
     // constructor argument.
-    HInstruction create = new HCreate(
+    HInstruction newObject = new HCreate(
         astAdapter.getClass(constructor.enclosingClass),
         constructorArguments,
         new TypeMask.nonNullExact(
@@ -283,14 +296,66 @@
         ],
         hasRtiInput: false);
 
-    add(create);
+    add(newObject);
 
     // Generate calls to the constructor bodies.
 
-    closeAndGotoExit(new HReturn(create, null));
+    for (ir.Constructor body in constructorChain.reversed) {
+      if (_isEmptyStatement(body.function.body)) continue;
+
+      List<HInstruction> bodyCallInputs = <HInstruction>[];
+      bodyCallInputs.add(newObject);
+
+      // Pass uncaptured arguments first, captured arguments in a box, then type
+      // arguments.
+
+      ConstructorElement constructorElement = astAdapter.getElement(body);
+      ClosureClassMap parameterClosureData = compiler.closureToClassMapper
+          .getClosureToClassMapping(constructorElement.resolvedAst);
+
+      var functionSignature = astAdapter.getFunctionSignature(body.function);
+      // Provide the parameters to the generative constructor body.
+      functionSignature.orderedForEachParameter((ParameterElement parameter) {
+        // If [parameter] is boxed, it will be a field in the box passed as the
+        // last parameter. So no need to directly pass it.
+        if (!localsHandler.isBoxed(parameter)) {
+          bodyCallInputs.add(localsHandler.readLocal(parameter));
+        }
+      });
+
+      // If there are locals that escape (i.e. mutated in closures), we pass the
+      // box to the constructor.
+      ClosureScope scopeData = parameterClosureData
+          .capturingScopes[constructorElement.resolvedAst.node];
+      if (scopeData != null) {
+        bodyCallInputs.add(localsHandler.readLocal(scopeData.boxElement));
+      }
+
+      // TODO(sra): Pass type arguments.
+
+      _invokeConstructorBody(body, bodyCallInputs);
+    }
+
+    closeAndGotoExit(new HReturn(newObject, null));
     closeFunction();
   }
 
+  static bool _isEmptyStatement(ir.Statement body) {
+    if (body is ir.EmptyStatement) return true;
+    if (body is ir.Block) return body.statements.every(_isEmptyStatement);
+    return false;
+  }
+
+  void _invokeConstructorBody(
+      ir.Constructor constructor, List<HInstruction> inputs) {
+    // TODO(sra): Inline the constructor body.
+    MemberEntity constructorBody =
+        astAdapter.getConstructorBodyEntity(constructor);
+    HInvokeConstructorBody invoke = new HInvokeConstructorBody(
+        constructorBody, inputs, commonMasks.nonNullType);
+    add(invoke);
+  }
+
   /// Maps the instance fields of a class to their SSA values.
   Map<ir.Field, HInstruction> _collectFieldValues(ir.Class clazz) {
     final fieldValues = <ir.Field, HInstruction>{};
@@ -315,7 +380,10 @@
 
   /// Collects field initializers all the way up the inheritance chain.
   void _buildInitializers(
-      ir.Constructor constructor, Map<ir.Field, HInstruction> fieldValues) {
+      ir.Constructor constructor,
+      List<ir.Constructor> constructorChain,
+      Map<ir.Field, HInstruction> fieldValues) {
+    constructorChain.add(constructor);
     var foundSuperOrRedirectCall = false;
     for (var initializer in constructor.initializers) {
       if (initializer is ir.SuperInitializer ||
@@ -324,29 +392,17 @@
         var superOrRedirectConstructor = initializer.target;
         var arguments = _normalizeAndBuildArguments(
             superOrRedirectConstructor.function, initializer.arguments);
-        _buildInlinedInitializers(
-            superOrRedirectConstructor, arguments, fieldValues);
+        _buildInlinedInitializers(superOrRedirectConstructor, arguments,
+            constructorChain, fieldValues);
       } else if (initializer is ir.FieldInitializer) {
         initializer.value.accept(this);
         fieldValues[initializer.field] = pop();
       }
     }
 
-    // Kernel always set the super initializer at the end, so if there was no
-    // super-call initializer, then the default constructor is called in the
-    // superclass.
     if (!foundSuperOrRedirectCall) {
-      if (constructor.enclosingClass != astAdapter.objectClass) {
-        var superclass = constructor.enclosingClass.superclass;
-        var defaultConstructor = superclass.constructors
-            .firstWhere((c) => c.name.name == '', orElse: () => null);
-        if (defaultConstructor == null) {
-          compiler.reporter.internalError(
-              NO_LOCATION_SPANNABLE, 'Could not find default constructor.');
-        }
-        _buildInlinedInitializers(
-            defaultConstructor, <HInstruction>[], fieldValues);
-      }
+      assert(constructor.enclosingClass == astAdapter.objectClass,
+          'All constructors have super-constructor initializers, except Object()');
     }
   }
 
@@ -396,8 +452,11 @@
   /// Inlines the given super [constructor]'s initializers by collecting its
   /// field values and building its constructor initializers. We visit super
   /// constructors all the way up to the [Object] constructor.
-  void _buildInlinedInitializers(ir.Constructor constructor,
-      List<HInstruction> arguments, Map<ir.Field, HInstruction> fieldValues) {
+  void _buildInlinedInitializers(
+      ir.Constructor constructor,
+      List<HInstruction> arguments,
+      List<ir.Constructor> constructorChain,
+      Map<ir.Field, HInstruction> fieldValues) {
     // TODO(het): Handle RTI if class needs it
     fieldValues.addAll(_collectFieldValues(constructor.enclosingClass));
 
@@ -414,7 +473,7 @@
 
     // TODO(het): set the locals handler state as if we were inlining the
     // constructor.
-    _buildInitializers(constructor, fieldValues);
+    _buildInitializers(constructor, constructorChain, fieldValues);
   }
 
   HTypeConversion buildFunctionTypeConversion(
@@ -424,6 +483,13 @@
         type, kind, original.instructionType, reifiedType, original);
   }
 
+  /// Builds generative constructor body.
+  void buildConstructorBody(ir.Constructor constructor) {
+    openFunction();
+    constructor.function.body.accept(this);
+    closeFunction();
+  }
+
   /// Builds a SSA graph for FunctionNodes, found in FunctionExpressions and
   /// Procedures.
   void buildFunctionNode(ir.FunctionNode functionNode) {
@@ -1143,7 +1209,7 @@
       return new NullJumpHandler(compiler.reporter);
     }
     if (isLoopJump && node is ir.SwitchStatement) {
-      throw 'Kernel Switch Statement handler not yet implemented.';
+      return new KernelSwitchCaseJumpHandler(this, target, node, astAdapter);
     }
 
     return new JumpHandler(this, target);
@@ -1236,9 +1302,6 @@
 
   @override
   void visitSwitchStatement(ir.SwitchStatement switchStatement) {
-    Map<ir.Expression, ConstantValue> constants =
-        _buildSwitchCaseConstants(switchStatement);
-
     // The switch case indices must match those computed in
     // [KernelSwitchCaseJumpHandler].
     bool hasContinue = false;
@@ -1260,9 +1323,10 @@
     if (!hasContinue) {
       // If the switch statement has no switch cases targeted by continue
       // statements we encode the switch statement directly.
-      _buildSimpleSwitchStatement(switchStatement, jumpHandler, constants);
+      _buildSimpleSwitchStatement(switchStatement, jumpHandler);
     } else {
-      throw 'Complex switch statement with continue label not implemented yet.';
+      _buildComplexSwitchStatement(
+          switchStatement, jumpHandler, caseIndex, hasDefault);
     }
   }
 
@@ -1270,43 +1334,192 @@
   static bool _isDefaultCase(ir.SwitchCase switchCase) =>
       switchCase == null || switchCase.isDefault;
 
+  /// Helper for building switch statements.
+  HInstruction _buildExpression(ir.SwitchStatement switchStatement) {
+    switchStatement.expression.accept(this);
+    return pop();
+  }
+
+  /// Helper method for creating the list of constants that make up the
+  /// switch case branches.
+  List<ConstantValue> _getSwitchConstants(
+      ir.SwitchStatement parentSwitch, ir.SwitchCase switchCase) {
+    Map<ir.Expression, ConstantValue> constantsLookup =
+        _buildSwitchCaseConstants(parentSwitch);
+    List<ConstantValue> constantList = <ConstantValue>[];
+    if (switchCase != null) {
+      for (var expression in switchCase.expressions) {
+        constantList.add(constantsLookup[expression]);
+      }
+    }
+    return constantList;
+  }
+
   /// Builds a simple switch statement which does not handle uses of continue
   /// statements to labeled switch cases.
-  void _buildSimpleSwitchStatement(ir.SwitchStatement switchStatement,
-      JumpHandler jumpHandler, Map<ir.Expression, ConstantValue> constants) {
+  void _buildSimpleSwitchStatement(
+      ir.SwitchStatement switchStatement, JumpHandler jumpHandler) {
     void buildSwitchCase(ir.SwitchCase switchCase) {
       switchCase.body.accept(this);
     }
 
-    handleSwitch(switchStatement, jumpHandler, switchStatement.cases,
-        _isDefaultCase, buildSwitchCase, constants);
+    _handleSwitch(
+        switchStatement,
+        jumpHandler,
+        _buildExpression,
+        switchStatement.cases,
+        _getSwitchConstants,
+        _isDefaultCase,
+        buildSwitchCase);
     jumpHandler.close();
   }
 
+  /// Builds a switch statement that can handle arbitrary uses of continue
+  /// statements to labeled switch cases.
+  void _buildComplexSwitchStatement(
+      ir.SwitchStatement switchStatement,
+      JumpHandler jumpHandler,
+      Map<ir.SwitchCase, int> caseIndex,
+      bool hasDefault) {
+    // If the switch statement has switch cases targeted by continue
+    // statements we create the following encoding:
+    //
+    //   switch (e) {
+    //     l_1: case e0: s_1; break;
+    //     l_2: case e1: s_2; continue l_i;
+    //     ...
+    //     l_n: default: s_n; continue l_j;
+    //   }
+    //
+    // is encoded as
+    //
+    //   var target;
+    //   switch (e) {
+    //     case e1: target = 1; break;
+    //     case e2: target = 2; break;
+    //     ...
+    //     default: target = n; break;
+    //   }
+    //   l: while (true) {
+    //    switch (target) {
+    //       case 1: s_1; break l;
+    //       case 2: s_2; target = i; continue l;
+    //       ...
+    //       case n: s_n; target = j; continue l;
+    //     }
+    //   }
+    //
+    // This is because JS does not have this same "continue label" semantics so
+    // we encode it in the form of a state machine.
+
+    JumpTarget switchTarget = astAdapter.getJumpTarget(switchStatement.parent);
+    localsHandler.updateLocal(switchTarget, graph.addConstantNull(closedWorld));
+
+    var switchCases = switchStatement.cases;
+    if (!hasDefault) {
+      // Use null as the marker for a synthetic default clause.
+      // The synthetic default is added because otherwise there would be no
+      // good place to give a default value to the local.
+      switchCases = new List<ir.SwitchCase>.from(switchCases);
+      switchCases.add(null);
+    }
+
+    void buildSwitchCase(ir.SwitchCase switchCase) {
+      if (switchCase != null) {
+        // Generate 'target = i; break;' for switch case i.
+        int index = caseIndex[switchCase];
+        HInstruction value = graph.addConstantInt(index, closedWorld);
+        localsHandler.updateLocal(switchTarget, value);
+      } else {
+        // Generate synthetic default case 'target = null; break;'.
+        HInstruction nullValue = graph.addConstantNull(closedWorld);
+        localsHandler.updateLocal(switchTarget, nullValue);
+      }
+      jumpTargets[switchTarget].generateBreak();
+    }
+
+    _handleSwitch(switchStatement, jumpHandler, _buildExpression, switchCases,
+        _getSwitchConstants, _isDefaultCase, buildSwitchCase);
+    jumpHandler.close();
+
+    HInstruction buildCondition() => graph.addConstantBool(true, closedWorld);
+
+    void buildSwitch() {
+      HInstruction buildExpression(ir.SwitchStatement notUsed) {
+        return localsHandler.readLocal(switchTarget);
+      }
+
+      List<ConstantValue> getConstants(
+          ir.SwitchStatement parentSwitch, ir.SwitchCase switchCase) {
+        return <ConstantValue>[
+          backend.constantSystem.createInt(caseIndex[switchCase])
+        ];
+      }
+
+      void buildSwitchCase(ir.SwitchCase switchCase) {
+        switchCase.body.accept(this);
+        if (!isAborted()) {
+          // Ensure that we break the loop if the case falls through. (This
+          // is only possible for the last case.)
+          jumpTargets[switchTarget].generateBreak();
+        }
+      }
+
+      // Pass a [NullJumpHandler] because the target for the contained break
+      // is not the generated switch statement but instead the loop generated
+      // in the call to [handleLoop] below.
+      _handleSwitch(
+          switchStatement, // nor is buildExpression.
+          new NullJumpHandler(compiler.reporter),
+          buildExpression,
+          switchStatement.cases,
+          getConstants,
+          (_) => false, // No case is default.
+          buildSwitchCase);
+    }
+
+    void buildLoop() {
+      loopHandler.handleLoop(
+          switchStatement, () {}, buildCondition, () {}, buildSwitch);
+    }
+
+    if (hasDefault) {
+      buildLoop();
+    } else {
+      // If the switch statement has no default case, surround the loop with
+      // a test of the target. So:
+      // `if (target) while (true) ...` If there's no default case, target is
+      // null, so we don't drop into the while loop.
+      void buildCondition() {
+        js.Template code = js.js.parseForeignJS('#');
+        push(new HForeignCode(
+            code, commonMasks.boolType, [localsHandler.readLocal(switchTarget)],
+            nativeBehavior: native.NativeBehavior.PURE));
+      }
+
+      handleIf(
+          node: switchStatement,
+          visitCondition: buildCondition,
+          visitThen: buildLoop,
+          visitElse: () => {});
+    }
+  }
+
   /// Creates a switch statement.
   ///
   /// [jumpHandler] is the [JumpHandler] for the created switch statement.
   /// [buildSwitchCase] creates the statements for the switch case.
-  void handleSwitch(
+  void _handleSwitch(
       ir.SwitchStatement switchStatement,
       JumpHandler jumpHandler,
+      HInstruction buildExpression(ir.SwitchStatement statement),
       List<ir.SwitchCase> switchCases,
+      List<ConstantValue> getConstants(
+          ir.SwitchStatement parentSwitch, ir.SwitchCase switchCase),
       bool isDefaultCase(ir.SwitchCase switchCase),
-      void buildSwitchCase(ir.SwitchCase switchCase),
-      Map<ir.Expression, ConstantValue> constantsLookup) {
+      void buildSwitchCase(ir.SwitchCase switchCase)) {
     HBasicBlock expressionStart = openNewBlock();
-    switchStatement.expression.accept(this);
-    HInstruction expression = pop();
-
-    List<ConstantValue> getConstants(ir.SwitchCase switchCase) {
-      List<ConstantValue> constantList = <ConstantValue>[];
-      if (switchCase != null) {
-        for (var expression in switchCase.expressions) {
-          constantList.add(constantsLookup[expression]);
-        }
-      }
-      return constantList;
-    }
+    HInstruction expression = buildExpression(switchStatement);
 
     if (switchCases.isEmpty) {
       return;
@@ -1320,7 +1533,8 @@
     bool hasDefault = false;
     for (ir.SwitchCase switchCase in switchCases) {
       HBasicBlock block = graph.addNewBlock();
-      for (ConstantValue constant in getConstants(switchCase)) {
+      for (ConstantValue constant
+          in getConstants(switchStatement, switchCase)) {
         HConstant hConstant = graph.addConstant(constant, closedWorld);
         switchInstruction.inputs.add(hConstant);
         hConstant.usedBy.add(switchInstruction);
@@ -1586,22 +1800,19 @@
       stack.add(graph.addConstant(constant, closedWorld));
       return;
     }
-    if (type is ir.TypeParameterType) {
-      // TODO(sra): Convert the type logic here to use ir.DartType.
-      ResolutionDartType dartType = astAdapter.getDartType(type);
-      dartType = localsHandler.substInContext(dartType);
-      HInstruction value = typeBuilder.analyzeTypeArgument(
-          dartType, sourceElement,
-          sourceInformation: null);
-      _pushStaticInvocation(astAdapter.runtimeTypeToString,
-          <HInstruction>[value], commonMasks.stringType);
-      _pushStaticInvocation(astAdapter.createRuntimeType, <HInstruction>[pop()],
-          astAdapter.createRuntimeTypeReturnType);
-      return;
-    }
-    // TODO(27394): Function types observed. Where are they from?
-    defaultExpression(typeLiteral);
-    return;
+    // For other types (e.g. TypeParameterType, function types from expanded
+    // typedefs), look-up or construct a reified type representation and convert
+    // to a RuntimeType.
+
+    // TODO(sra): Convert the type logic here to use ir.DartType.
+    ResolutionDartType dartType = astAdapter.getDartType(type);
+    dartType = localsHandler.substInContext(dartType);
+    HInstruction value = typeBuilder
+        .analyzeTypeArgument(dartType, sourceElement, sourceInformation: null);
+    _pushStaticInvocation(astAdapter.runtimeTypeToString, <HInstruction>[value],
+        commonMasks.stringType);
+    _pushStaticInvocation(astAdapter.createRuntimeType, <HInstruction>[pop()],
+        astAdapter.createRuntimeTypeReturnType);
   }
 
   @override
@@ -1636,7 +1847,7 @@
     staticSet.value.accept(this);
     HInstruction value = pop();
 
-    var staticTarget = staticSet.target;
+    ir.Member staticTarget = staticSet.target;
     if (staticTarget is ir.Procedure) {
       // Invoke the setter
       _pushStaticInvocation(staticTarget, <HInstruction>[value],
@@ -2029,10 +2240,10 @@
                   function.positionalParameters.length &&
               function.namedParameters.isEmpty) {
             registry?.registerStaticUse(
-                new StaticUse.foreignUse(astAdapter.getMember(staticTarget)));
+                new StaticUse.foreignUse(astAdapter.getMethod(staticTarget)));
             push(new HForeignCode(
                 js.js.expressionTemplateYielding(backend.emitter
-                    .staticFunctionAccess(astAdapter.getMember(staticTarget))),
+                    .staticFunctionAccess(astAdapter.getMethod(staticTarget))),
                 commonMasks.dynamicType,
                 <HInstruction>[],
                 nativeBehavior: native.NativeBehavior.PURE));
@@ -2280,7 +2491,7 @@
   }
 
   void _pushStaticInvocation(
-      ir.Node target, List<HInstruction> arguments, TypeMask typeMask) {
+      ir.Member target, List<HInstruction> arguments, TypeMask typeMask) {
     HInvokeStatic instruction = new HInvokeStatic(
         astAdapter.getMember(target), arguments, typeMask,
         targetCanThrow: astAdapter.getCanThrow(target, closedWorld));
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 78a800f..7709a20 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -2881,6 +2881,7 @@
     assert(node.isCheckedModeCheck || node.isCastTypeCheck);
     DartType type = node.typeExpression;
     assert(!type.isTypedef);
+    assert(!type.isDynamic);
     if (type.isFunctionType) {
       // TODO(5022): We currently generate $isFunction checks for
       // function types.
diff --git a/pkg/compiler/lib/src/ssa/jump_handler.dart b/pkg/compiler/lib/src/ssa/jump_handler.dart
index d401ca8..c3d1528 100644
--- a/pkg/compiler/lib/src/ssa/jump_handler.dart
+++ b/pkg/compiler/lib/src/ssa/jump_handler.dart
@@ -150,36 +150,13 @@
 
 /// Special [JumpHandler] implementation used to handle continue statements
 /// targeting switch cases.
-class SwitchCaseJumpHandler extends TargetJumpHandler {
+abstract class SwitchCaseJumpHandler extends TargetJumpHandler {
   /// Map from switch case targets to indices used to encode the flow of the
   /// switch case loop.
   final Map<JumpTarget, int> targetIndexMap = new Map<JumpTarget, int>();
 
-  SwitchCaseJumpHandler(
-      GraphBuilder builder, JumpTarget target, ast.SwitchStatement node)
-      : super(builder, target) {
-    // The switch case indices must match those computed in
-    // [SsaFromAstMixin.buildSwitchCaseConstants].
-    // Switch indices are 1-based so we can bypass the synthetic loop when no
-    // cases match simply by branching on the index (which defaults to null).
-    int switchIndex = 1;
-    for (ast.SwitchCase switchCase in node.cases) {
-      for (ast.Node labelOrCase in switchCase.labelsAndCases) {
-        ast.Node label = labelOrCase.asLabel();
-        if (label != null) {
-          LabelDefinition labelElement =
-              builder.elements.getLabelDefinition(label);
-          if (labelElement != null && labelElement.isContinueTarget) {
-            JumpTarget continueTarget = labelElement.target;
-            targetIndexMap[continueTarget] = switchIndex;
-            assert(builder.jumpTargets[continueTarget] == null);
-            builder.jumpTargets[continueTarget] = this;
-          }
-        }
-      }
-      switchIndex++;
-    }
-  }
+  SwitchCaseJumpHandler(GraphBuilder builder, JumpTarget target)
+      : super(builder, target);
 
   void generateBreak([LabelDefinition label]) {
     if (label == null) {
@@ -232,3 +209,33 @@
     super.close();
   }
 }
+
+/// Special [JumpHandler] implementation used to handle continue statements
+/// targeting switch cases.
+class AstSwitchCaseJumpHandler extends SwitchCaseJumpHandler {
+  AstSwitchCaseJumpHandler(
+      GraphBuilder builder, JumpTarget target, ast.SwitchStatement node)
+      : super(builder, target) {
+    // The switch case indices must match those computed in
+    // [SsaFromAstMixin.buildSwitchCaseConstants].
+    // Switch indices are 1-based so we can bypass the synthetic loop when no
+    // cases match simply by branching on the index (which defaults to null).
+    int switchIndex = 1;
+    for (ast.SwitchCase switchCase in node.cases) {
+      for (ast.Node labelOrCase in switchCase.labelsAndCases) {
+        ast.Node label = labelOrCase.asLabel();
+        if (label != null) {
+          LabelDefinition labelElement =
+              builder.elements.getLabelDefinition(label);
+          if (labelElement != null && labelElement.isContinueTarget) {
+            JumpTarget continueTarget = labelElement.target;
+            targetIndexMap[continueTarget] = switchIndex;
+            assert(builder.jumpTargets[continueTarget] == null);
+            builder.jumpTargets[continueTarget] = this;
+          }
+        }
+      }
+      switchIndex++;
+    }
+  }
+}
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
index f1396ca..ea8dedb 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -12,7 +12,9 @@
 import '../constants/values.dart';
 import '../elements/resolution_types.dart';
 import '../elements/elements.dart';
+import '../elements/entities.dart';
 import '../elements/modelx.dart';
+import '../elements/types.dart';
 import '../js/js.dart' as js;
 import '../js_backend/backend_helpers.dart';
 import '../js_backend/js_backend.dart';
@@ -27,14 +29,97 @@
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
 import '../world.dart';
+import 'graph_builder.dart';
 import 'jump_handler.dart' show SwitchCaseJumpHandler;
 import 'locals_handler.dart';
 import 'types.dart';
 
+/// Interface that translates between Kernel IR nodes and entities.
+abstract class KernelWorldBuilder {
+  /// Returns the [DartType] corresponding to [type].
+  DartType getDartType(ir.DartType type);
+
+  /// Returns the list of [DartType]s corresponding to [types].
+  List<DartType> getDartTypes(List<ir.DartType> types);
+
+  /// Returns the [InterfaceType] corresponding to [type].
+  InterfaceType getInterfaceType(ir.InterfaceType type);
+
+  /// Return the [InterfaceType] corresponding to the [cls] with the given
+  /// [typeArguments].
+  InterfaceType createInterfaceType(
+      ir.Class cls, List<ir.DartType> typeArguments);
+
+  /// Returns the [CallStructure] corresponding to the [arguments].
+  CallStructure getCallStructure(ir.Arguments arguments);
+
+  /// Returns the [Selector] corresponding to the invocation or getter/setter
+  /// access of [node].
+  Selector getSelector(ir.Expression node);
+
+  /// Returns the [FunctionEntity] corresponding to the generative or factory
+  /// constructor [node].
+  FunctionEntity getConstructor(ir.Member node);
+
+  /// Returns the [MemberEntity] corresponding to the member [node].
+  MemberEntity getMember(ir.Member node);
+
+  /// Returns the [FunctionEntity] corresponding to the procedure [node].
+  FunctionEntity getMethod(ir.Procedure node);
+
+  /// Returns the [FieldEntity] corresponding to the field [node].
+  FieldEntity getField(ir.Field node);
+
+  /// Returns the [ClassEntity] corresponding to the class [node].
+  ClassEntity getClass(ir.Class node);
+
+  /// Returns the [Local] corresponding to the [node]. The node must be either
+  /// a [ir.FunctionDeclaration] or [ir.FunctionExpression].
+  Local getLocalFunction(ir.Node node);
+
+  /// Returns the [Name] corresponding to [name].
+  Name getName(ir.Name name);
+
+  /// Returns `true` is [node] has a `@Native(...)` annotation.
+  bool isNativeClass(ir.Class node);
+
+  /// Return `true` if [node] is the `dart:_foreign_helper` library.
+  bool isForeignLibrary(ir.Library node);
+
+  /// Computes the native behavior for reading the native [field].
+  native.NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field);
+
+  /// Computes the native behavior for writing to the native [field].
+  native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field);
+
+  /// Computes the native behavior for calling [procedure].
+  native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure);
+
+  /// Computes the [native.NativeBehavior] for a call to the [JS] function.
+  native.NativeBehavior getNativeBehaviorForJsCall(ir.StaticInvocation node);
+
+  /// Computes the [native.NativeBehavior] for a call to the [JS_BUILTIN]
+  /// function.
+  native.NativeBehavior getNativeBehaviorForJsBuiltinCall(
+      ir.StaticInvocation node);
+
+  /// Computes the [native.NativeBehavior] for a call to the
+  /// [JS_EMBEDDED_GLOBAL] function.
+  native.NativeBehavior getNativeBehaviorForJsEmbeddedGlobalCall(
+      ir.StaticInvocation node);
+
+  /// Compute the kind of foreign helper function called by [node], if any.
+  ForeignKind getForeignKind(ir.StaticInvocation node);
+
+  /// Computes the [InterfaceType] referenced by a call to the
+  /// [JS_INTERCEPTOR_CONSTANT] function, if any.
+  InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node);
+}
+
 /// A helper class that abstracts all accesses of the AST from Kernel nodes.
 ///
 /// The goal is to remove all need for the AST from the Kernel SSA builder.
-class KernelAstAdapter {
+class KernelAstAdapter implements KernelWorldBuilder {
   final Kernel kernel;
   final JavaScriptBackend _backend;
   final Map<ir.Node, ast.Node> _nodeToAst;
@@ -102,7 +187,8 @@
       _compiler.globalInference.results;
 
   GlobalTypeInferenceElementResult _resultOf(Element e) =>
-      _globalInferenceResults.resultOf(e);
+      _globalInferenceResults
+          .resultOf(e is ConstructorBodyElementX ? e.constructor : e);
 
   ConstantValue getConstantForSymbol(ir.SymbolLiteral node) {
     if (kernel.syntheticNodes.contains(node)) {
@@ -124,13 +210,18 @@
     return result;
   }
 
-  MemberElement getMember(ir.Node node) => getElement(node).declaration;
+  ConstructorElement getConstructor(ir.Member node) =>
+      getElement(node).declaration;
 
-  MethodElement getMethod(ir.Node node) => getElement(node).declaration;
+  MemberElement getMember(ir.Member node) => getElement(node).declaration;
 
-  FieldElement getField(ir.Node node) => getElement(node).declaration;
+  MethodElement getMethod(ir.Procedure node) => getElement(node).declaration;
 
-  ClassElement getClass(ir.Node node) => getElement(node).declaration;
+  FieldElement getField(ir.Field node) => getElement(node).declaration;
+
+  ClassElement getClass(ir.Class node) => getElement(node).declaration;
+
+  LocalFunctionElement getLocalFunction(ir.Node node) => getElement(node);
 
   ast.Node getNode(ir.Node node) {
     ast.Node result = _nodeToAst[node];
@@ -262,7 +353,7 @@
       assertNodeIsSynthetic(listLiteral);
       return closedWorld.commonMasks.growableListType;
     }
-    return _resultOf(owner).typeOfNewList(getNode(listLiteral)) ??
+    return _resultOf(owner).typeOfListLiteral(getNode(listLiteral)) ??
         closedWorld.commonMasks.dynamicType;
   }
 
@@ -372,17 +463,17 @@
 
   LibraryElement get jsHelperLibrary => _backend.helpers.jsHelperLibrary;
 
-  KernelJumpTarget getJumpTarget(ir.TreeNode node) =>
-      _jumpTargets.putIfAbsent(node, () {
-        if (node is ir.LabeledStatement &&
-            _jumpTargets.containsKey((node as ir.LabeledStatement).body)) {
-          return _jumpTargets[(node as ir.LabeledStatement).body];
-        }
-        return new KernelJumpTarget(node);
-      });
-
-  LabelDefinition getTargetLabel(ir.Node node) =>
-      elements.getTargetLabel(getNode(node));
+  KernelJumpTarget getJumpTarget(ir.TreeNode node,
+      {bool isContinueTarget: false}) {
+    return _jumpTargets.putIfAbsent(node, () {
+      if (node is ir.LabeledStatement &&
+          _jumpTargets.containsKey((node as ir.LabeledStatement).body)) {
+        return _jumpTargets[(node as ir.LabeledStatement).body];
+      }
+      return new KernelJumpTarget(node, this,
+          makeContinueLabel: isContinueTarget);
+    });
+  }
 
   ir.Class get mapLiteralClass =>
       kernel.classes[_backend.helpers.mapLiteralClass];
@@ -416,6 +507,7 @@
   TypeMask get streamIteratorConstructorType =>
       TypeMaskFactory.inferredReturnTypeForElement(
           _backend.helpers.streamIteratorConstructor, _globalInferenceResults);
+
   ir.Procedure get fallThroughError =>
       kernel.functions[_backend.helpers.fallThroughError];
 
@@ -546,14 +638,14 @@
     return types.map(getDartType).toList();
   }
 
-  ResolutionDartType getDartTypeOfListLiteral(ir.ListLiteral list) {
+  ResolutionInterfaceType getDartTypeOfListLiteral(ir.ListLiteral list) {
     ast.Node node = getNodeOrNull(list);
     if (node != null) return elements.getType(node);
     assertNodeIsSynthetic(list);
     return _compiler.commonElements.listType(getDartType(list.typeArgument));
   }
 
-  ResolutionDartType getDartTypeOfMapLiteral(ir.MapLiteral literal) {
+  ResolutionInterfaceType getDartTypeOfMapLiteral(ir.MapLiteral literal) {
     ast.Node node = getNodeOrNull(literal);
     if (node != null) return elements.getType(node);
     assertNodeIsSynthetic(literal);
@@ -590,6 +682,15 @@
         optionalParameterTypes, namedParameters, namedParameterTypes);
   }
 
+  ResolutionInterfaceType getInterfaceType(ir.InterfaceType type) =>
+      getDartType(type);
+
+  ResolutionInterfaceType createInterfaceType(
+      ir.Class cls, List<ir.DartType> typeArguments) {
+    return new ResolutionInterfaceType(
+        getClass(cls), getDartTypes(typeArguments));
+  }
+
   /// Converts [annotations] into a list of [ConstantExpression]s.
   List<ConstantExpression> getMetadata(List<ir.Expression> annotations) {
     List<ConstantExpression> metadata = <ConstantExpression>[];
@@ -758,9 +859,24 @@
         _compiler.commonElements);
   }
 
+  /// Computes the [InterfaceType] referenced by a call to the
+  /// [JS_INTERCEPTOR_CONSTANT] function, if any.
+  InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node) {
+    if (node.arguments.positional.length != 1 ||
+        node.arguments.named.isNotEmpty) {
+      reporter.reportErrorMessage(CURRENT_ELEMENT_SPANNABLE,
+          MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
+    }
+    ir.Node argument = node.arguments.positional.first;
+    if (argument is ir.TypeLiteral && argument.type is ir.InterfaceType) {
+      return getInterfaceType(argument.type);
+    }
+    return null;
+  }
+
   /// Returns `true` is [node] has a `@Native(...)` annotation.
   // TODO(johnniwinther): Cache this for later use.
-  bool isNative(ir.Class node) {
+  bool isNativeClass(ir.Class node) {
     for (ir.Expression annotation in node.annotations) {
       if (annotation is ir.ConstructorInvocation) {
         ConstructorElement target = getElement(annotation.target).declaration;
@@ -799,6 +915,14 @@
         metadata, _typeLookup(resolveAsRaw: false), _compiler,
         isJsInterop: false);
   }
+
+  MemberEntity getConstructorBodyEntity(ir.Constructor constructor) {
+    AstElement element = getElement(constructor);
+    MemberEntity constructorBody =
+        ConstructorBodyElementX.createFromResolvedAst(element.resolvedAst);
+    assert(constructorBody != null);
+    return constructorBody;
+  }
 }
 
 /// Kinds of foreign functions.
@@ -992,15 +1116,35 @@
   @override
   bool isContinueTarget = false;
 
-  KernelJumpTarget(this.targetStatement) {
-    labels = <LabelDefinition>[];
+  KernelJumpTarget(this.targetStatement, KernelAstAdapter adapter,
+      {bool makeContinueLabel = false}) {
     originalStatement = targetStatement;
-    if (targetStatement is ir.LabeledStatement) {
+    this.labels = <LabelDefinition>[];
+    if (targetStatement is ir.WhileStatement ||
+        targetStatement is ir.DoStatement ||
+        targetStatement is ir.ForStatement ||
+        targetStatement is ir.ForInStatement) {
+      // Currently these labels are set at resolution on the element itself.
+      // Once that gets updated, this logic can change downstream.
+      JumpTarget target = adapter.elements
+          .getTargetDefinition(adapter.getNode(targetStatement));
+      if (target != null) {
+        labels.addAll(target.labels);
+        isBreakTarget = target.isBreakTarget;
+        isContinueTarget = target.isContinueTarget;
+      }
+    } else if (targetStatement is ir.LabeledStatement) {
       targetStatement = (targetStatement as ir.LabeledStatement).body;
       labels.add(
           new LabelDefinitionX(null, 'L${index++}', this)..setBreakTarget());
       isBreakTarget = true;
     }
+
+    if (makeContinueLabel) {
+      labels.add(
+          new LabelDefinitionX(null, 'L${index++}', this)..setContinueTarget());
+      isContinueTarget = true;
+    }
   }
 
   @override
@@ -1023,13 +1167,42 @@
   List<LabelDefinition> labels;
 
   @override
-  String get name => null;
+  String get name => 'target';
 
+  // TODO(efortuna): In the original version, this nesting level is specified at
+  // jump target construction time, by the resolver. Because these are
+  // instantiated later, we don't have that information. When we move fully over
+  // to the kernel model, we can pass the nesting level in KernelJumpTarget's
+  // constructor.
   @override
-  int get nestingLevel => 1;
+  int get nestingLevel => 0;
 
   @override
   ast.Node get statement => null;
 
   String toString() => 'Target:$targetStatement';
 }
+
+/// Special [JumpHandler] implementation used to handle continue statements
+/// targeting switch cases.
+class KernelSwitchCaseJumpHandler extends SwitchCaseJumpHandler {
+  KernelSwitchCaseJumpHandler(GraphBuilder builder, JumpTarget target,
+      ir.SwitchStatement switchStatement, KernelAstAdapter astAdapter)
+      : super(builder, target) {
+    // The switch case indices must match those computed in
+    // [KernelSsaBuilder.buildSwitchCaseConstants].
+    // Switch indices are 1-based so we can bypass the synthetic loop when no
+    // cases match simply by branching on the index (which defaults to null).
+    // TODO
+    int switchIndex = 1;
+    for (ir.SwitchCase switchCase in switchStatement.cases) {
+      JumpTarget continueTarget =
+          astAdapter.getJumpTarget(switchCase, isContinueTarget: true);
+      assert(continueTarget is KernelJumpTarget);
+      targetIndexMap[continueTarget] = switchIndex;
+      assert(builder.jumpTargets[continueTarget] == null);
+      builder.jumpTargets[continueTarget] = this;
+      switchIndex++;
+    }
+  }
+}
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart
index fbfacea..54d2686 100644
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart
@@ -8,12 +8,13 @@
 import '../common/names.dart';
 import '../compiler.dart';
 import '../constants/expressions.dart';
-import '../elements/resolution_types.dart';
-import '../elements/elements.dart';
+import '../core_types.dart';
+import '../elements/types.dart';
+import '../elements/elements.dart' show AstElement, ResolvedAst;
+import '../elements/entities.dart';
 import '../js_backend/backend.dart' show JavaScriptBackend;
 import '../kernel/kernel.dart';
 import '../kernel/kernel_debug.dart';
-import '../kernel/kernel_visitor.dart';
 import '../resolution/registry.dart' show ResolutionWorldImpactBuilder;
 import '../universe/call_structure.dart';
 import '../universe/feature.dart';
@@ -29,8 +30,10 @@
   return compiler.reporter.withCurrentElement(element.implementation, () {
     JavaScriptBackend backend = compiler.backend;
     Kernel kernel = backend.kernelTask.kernel;
-    KernelImpactBuilder builder =
-        new KernelImpactBuilder(resolvedAst, compiler, kernel);
+    KernelAstAdapter astAdapter = new KernelAstAdapter(kernel, compiler.backend,
+        resolvedAst, kernel.nodeToAst, kernel.nodeToElement);
+    KernelImpactBuilder builder = new KernelImpactBuilder(
+        '${resolvedAst.element}', astAdapter, compiler.commonElements);
     if (element.isFunction ||
         element.isGetter ||
         element.isSetter ||
@@ -62,24 +65,16 @@
 }
 
 class KernelImpactBuilder extends ir.Visitor {
-  final ResolvedAst resolvedAst;
-  final Compiler compiler;
+  final ResolutionWorldImpactBuilder impactBuilder;
+  final KernelWorldBuilder astAdapter;
+  final CommonElements commonElements;
 
-  JavaScriptBackend get backend => compiler.backend;
-
-  ResolutionWorldImpactBuilder impactBuilder;
-  KernelAstAdapter astAdapter;
-
-  KernelImpactBuilder(this.resolvedAst, this.compiler, Kernel kernel) {
-    this.impactBuilder =
-        new ResolutionWorldImpactBuilder('${resolvedAst.element}');
-    this.astAdapter = new KernelAstAdapter(kernel, compiler.backend,
-        resolvedAst, kernel.nodeToAst, kernel.nodeToElement);
-  }
+  KernelImpactBuilder(String name, this.astAdapter, this.commonElements)
+      : this.impactBuilder = new ResolutionWorldImpactBuilder(name);
 
   /// Add a checked-mode type use of [type] if it is not `dynamic`.
-  ResolutionDartType checkType(ir.DartType irType) {
-    ResolutionDartType type = astAdapter.getDartType(irType);
+  DartType checkType(ir.DartType irType) {
+    DartType type = astAdapter.getDartType(irType);
     if (!type.isDynamic) {
       impactBuilder.registerTypeUse(new TypeUse.checkedModeCheck(type));
     }
@@ -113,7 +108,8 @@
         impactBuilder.registerFeature(Feature.LAZY_FIELD);
       }
     }
-    if (field.isInstanceMember && astAdapter.isNative(field.enclosingClass)) {
+    if (field.isInstanceMember &&
+        astAdapter.isNativeClass(field.enclosingClass)) {
       impactBuilder
           .registerNativeData(astAdapter.getNativeBehaviorForFieldLoad(field));
       impactBuilder
@@ -145,7 +141,7 @@
         impactBuilder.registerFeature(Feature.ASYNC_STAR);
         break;
       case ir.AsyncMarker.SyncYielding:
-        compiler.reporter.internalError(resolvedAst.element,
+        throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE,
             "Unexpected async marker: ${procedure.function.asyncMarker}");
     }
     if (procedure.isExternal &&
@@ -219,10 +215,10 @@
   @override
   void visitListLiteral(ir.ListLiteral literal) {
     visitNodes(literal.expressions);
-    ResolutionDartType elementType = checkType(literal.typeArgument);
+    DartType elementType = checkType(literal.typeArgument);
 
     impactBuilder.registerListLiteral(new ListLiteralUse(
-        compiler.commonElements.listType(elementType),
+        commonElements.listType(elementType),
         isConstant: literal.isConst,
         isEmpty: literal.expressions.isEmpty));
   }
@@ -230,10 +226,10 @@
   @override
   void visitMapLiteral(ir.MapLiteral literal) {
     visitNodes(literal.entries);
-    ResolutionDartType keyType = checkType(literal.keyType);
-    ResolutionDartType valueType = checkType(literal.valueType);
+    DartType keyType = checkType(literal.keyType);
+    DartType valueType = checkType(literal.valueType);
     impactBuilder.registerMapLiteral(new MapLiteralUse(
-        compiler.commonElements.mapType(keyType, valueType),
+        commonElements.mapType(keyType, valueType),
         isConstant: literal.isConst,
         isEmpty: literal.entries.isEmpty));
   }
@@ -256,24 +252,22 @@
   void handleNew(ir.InvocationExpression node, ir.Member target,
       {bool isConst: false}) {
     _visitArguments(node.arguments);
-    Element element = astAdapter.getElement(target).declaration;
-    ClassElement cls = astAdapter.getElement(target.enclosingClass);
-    List<ResolutionDartType> typeArguments =
-        astAdapter.getDartTypes(node.arguments.types);
-    ResolutionInterfaceType type =
-        new ResolutionInterfaceType(cls, typeArguments);
+    FunctionEntity constructor = astAdapter.getConstructor(target);
+    InterfaceType type = astAdapter.createInterfaceType(
+        target.enclosingClass, node.arguments.types);
     CallStructure callStructure = astAdapter.getCallStructure(node.arguments);
     impactBuilder.registerStaticUse(isConst
-        ? new StaticUse.constConstructorInvoke(element, callStructure, type)
-        : new StaticUse.typedConstructorInvoke(element, callStructure, type));
-    if (typeArguments.any((ResolutionDartType type) => !type.isDynamic)) {
+        ? new StaticUse.constConstructorInvoke(constructor, callStructure, type)
+        : new StaticUse.typedConstructorInvoke(
+            constructor, callStructure, type));
+    if (type.typeArguments.any((DartType type) => !type.isDynamic)) {
       impactBuilder.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);
     }
   }
 
   @override
   void visitSuperInitializer(ir.SuperInitializer node) {
-    Element target = astAdapter.getElement(node.target).declaration;
+    FunctionEntity target = astAdapter.getConstructor(node.target);
     _visitArguments(node.arguments);
     impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
         target, astAdapter.getCallStructure(node.arguments)));
@@ -281,8 +275,8 @@
 
   @override
   void visitStaticInvocation(ir.StaticInvocation node) {
-    Element target = astAdapter.getElement(node.target).declaration;
-    if (target.isFactoryConstructor) {
+    FunctionEntity target = astAdapter.getMethod(node.target);
+    if (node.target.kind == ir.ProcedureKind.Factory) {
       // TODO(johnniwinther): We should not mark the type as instantiated but
       // rather follow the type arguments directly.
       //
@@ -325,14 +319,9 @@
             astAdapter.getNativeBehaviorForJsEmbeddedGlobalCall(node));
         break;
       case ForeignKind.JS_INTERCEPTOR_CONSTANT:
-        if (node.arguments.positional.length != 1 ||
-            node.arguments.named.isNotEmpty) {
-          astAdapter.reporter.reportErrorMessage(CURRENT_ELEMENT_SPANNABLE,
-              MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
-        }
-        ir.Node argument = node.arguments.positional.first;
-        if (argument is ir.TypeLiteral && argument.type is ir.InterfaceType) {
-          ResolutionInterfaceType type = astAdapter.getDartType(argument.type);
+        InterfaceType type =
+            astAdapter.getInterfaceTypeForJsInterceptorCall(node);
+        if (type != null) {
           impactBuilder.registerTypeUse(new TypeUse.instantiation(type));
         }
         break;
@@ -344,26 +333,27 @@
   @override
   void visitStaticGet(ir.StaticGet node) {
     ir.Member target = node.target;
-    Element element = astAdapter.getElement(target).declaration;
     if (target is ir.Procedure && target.kind == ir.ProcedureKind.Method) {
-      impactBuilder.registerStaticUse(new StaticUse.staticTearOff(element));
+      FunctionEntity method = astAdapter.getMethod(target);
+      impactBuilder.registerStaticUse(new StaticUse.staticTearOff(method));
     } else {
-      impactBuilder.registerStaticUse(new StaticUse.staticGet(element));
+      MemberEntity member = astAdapter.getMember(target);
+      impactBuilder.registerStaticUse(new StaticUse.staticGet(member));
     }
   }
 
   @override
   void visitStaticSet(ir.StaticSet node) {
     visitNode(node.value);
-    Element element = astAdapter.getElement(node.target).declaration;
-    impactBuilder.registerStaticUse(new StaticUse.staticSet(element));
+    MemberEntity member = astAdapter.getMember(node.target);
+    impactBuilder.registerStaticUse(new StaticUse.staticSet(member));
   }
 
   void handleSuperInvocation(ir.Node target, ir.Node arguments) {
-    Element element = astAdapter.getElement(target).declaration;
+    FunctionEntity method = astAdapter.getMethod(target);
     _visitArguments(arguments);
     impactBuilder.registerStaticUse(new StaticUse.superInvoke(
-        element, astAdapter.getCallStructure(arguments)));
+        method, astAdapter.getCallStructure(arguments)));
   }
 
   @override
@@ -379,16 +369,17 @@
   }
 
   void handleSuperGet(ir.Member target) {
-    Element element = astAdapter.getElement(target).declaration;
     if (target is ir.Procedure && target.kind == ir.ProcedureKind.Method) {
-      impactBuilder.registerStaticUse(new StaticUse.superTearOff(element));
+      FunctionEntity method = astAdapter.getMethod(target);
+      impactBuilder.registerStaticUse(new StaticUse.superTearOff(method));
     } else {
-      impactBuilder.registerStaticUse(new StaticUse.superGet(element));
+      MemberEntity member = astAdapter.getMember(target);
+      impactBuilder.registerStaticUse(new StaticUse.superGet(member));
     }
   }
 
   @override
-  void visitDirectGet(ir.StaticGet node) {
+  void visitDirectPropertyGet(ir.DirectPropertyGet node) {
     handleSuperGet(node.target);
   }
 
@@ -399,11 +390,12 @@
 
   void handleSuperSet(ir.Node target, ir.Node value) {
     visitNode(value);
-    Element element = astAdapter.getElement(target).declaration;
     if (target is ir.Field) {
-      impactBuilder.registerStaticUse(new StaticUse.superFieldSet(element));
+      FieldEntity field = astAdapter.getField(target);
+      impactBuilder.registerStaticUse(new StaticUse.superFieldSet(field));
     } else {
-      impactBuilder.registerStaticUse(new StaticUse.superSetterSet(element));
+      FunctionEntity method = astAdapter.getMethod(target);
+      impactBuilder.registerStaticUse(new StaticUse.superSetterSet(method));
     }
   }
 
@@ -464,16 +456,16 @@
 
   @override
   void visitFunctionDeclaration(ir.FunctionDeclaration node) {
-    impactBuilder
-        .registerStaticUse(new StaticUse.closure(astAdapter.getElement(node)));
+    impactBuilder.registerStaticUse(
+        new StaticUse.closure(astAdapter.getLocalFunction(node)));
     handleSignature(node.function);
     visitNode(node.function.body);
   }
 
   @override
   void visitFunctionExpression(ir.FunctionExpression node) {
-    impactBuilder
-        .registerStaticUse(new StaticUse.closure(astAdapter.getElement(node)));
+    impactBuilder.registerStaticUse(
+        new StaticUse.closure(astAdapter.getLocalFunction(node)));
     handleSignature(node.function);
     visitNode(node.function.body);
   }
@@ -558,14 +550,14 @@
   @override
   void visitFieldInitializer(ir.FieldInitializer node) {
     impactBuilder.registerStaticUse(
-        new StaticUse.fieldInit(astAdapter.getElement(node.field)));
+        new StaticUse.fieldInit(astAdapter.getField(node.field)));
     visitNode(node.value);
   }
 
   @override
   void visitRedirectingInitializer(ir.RedirectingInitializer node) {
     _visitArguments(node.arguments);
-    Element target = astAdapter.getElement(node.target).declaration;
+    FunctionEntity target = astAdapter.getConstructor(node.target);
     impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
         target, astAdapter.getCallStructure(node.arguments)));
   }
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart
index 77fe430..70d9522 100644
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart
@@ -276,6 +276,10 @@
           new HParameterValue(parameter, new TypeMask.exact(cls, closedWorld));
       builder.graph.explicitReceiverParameter = value;
       builder.graph.entry.addAtEntry(value);
+      if (builder.lastAddedParameter == null) {
+        // If this is the first parameter inserted, make sure it stays first.
+        builder.lastAddedParameter = value;
+      }
     }
   }
 
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index d84aaf3..b7b0c0a 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -1005,7 +1005,13 @@
     propagateConstantValueToUses(node);
     MemberEntity element = node.element;
 
-    if (element == backend.helpers.checkConcurrentModificationError) {
+    if (element == compiler.commonElements.identicalFunction) {
+      if (node.inputs.length == 2) {
+        return new HIdentity(node.inputs[0], node.inputs[1], null,
+            closedWorld.commonMasks.boolType)
+          ..sourceInformation = node.sourceInformation;
+      }
+    } else if (element == backend.helpers.checkConcurrentModificationError) {
       if (node.inputs.length == 2) {
         HInstruction firstArgument = node.inputs[0];
         if (firstArgument is HConstant) {
diff --git a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
index fd67da6..ea06f8b 100644
--- a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
+++ b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
@@ -4,7 +4,6 @@
 /// continue statements in the body of any switch cases (having continue
 /// statements results in a more complex generated code).
 class SwitchContinueAnalysis extends ir.Visitor<bool> {
-
   SwitchContinueAnalysis._();
 
   static bool containsContinue(ir.Statement switchCaseBody) {
@@ -86,8 +85,7 @@
   }
 
   bool visitTryFinally(ir.TryFinally tryFinally) {
-    return tryFinally.body.accept(this) &&
-        tryFinally.finalizer.accept(this);
+    return tryFinally.body.accept(this) && tryFinally.finalizer.accept(this);
   }
 
   bool visitFunctionDeclaration(ir.FunctionDeclaration declaration) {
@@ -99,10 +97,14 @@
   }
 
   bool defaultStatement(ir.Statement node) {
-    if (node is ir.ExpressionStatement || node is ir.EmptyStatement ||
-        node is ir.InvalidStatement || node is ir.BreakStatement ||
-        node is ir.ReturnStatement || node is ir.AssertStatement ||
-        node is ir.YieldStatement || node is ir.VariableDeclaration) {
+    if (node is ir.ExpressionStatement ||
+        node is ir.EmptyStatement ||
+        node is ir.InvalidStatement ||
+        node is ir.BreakStatement ||
+        node is ir.ReturnStatement ||
+        node is ir.AssertStatement ||
+        node is ir.YieldStatement ||
+        node is ir.VariableDeclaration) {
       return false;
     }
     throw 'Statement type ${node.runtimeType} not handled in '
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
index 14da1cd..e7d66ce 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -111,8 +111,9 @@
         return false;
       }
     }
-    return compiler.types.isAssignable(
-        computeType(compiler.resolution), compiler.commonElements.functionType);
+    ResolutionInterfaceType functionType = compiler.commonElements.functionType;
+    return compiler.types
+        .isAssignable(computeType(compiler.resolution), functionType);
   }
 }
 
@@ -230,7 +231,7 @@
 
   String get name => type.name;
 
-  ResolutionDartType computeType(Resolution resolution) =>
+  ResolutionInterfaceType computeType(Resolution resolution) =>
       resolution.commonElements.typeType;
 
   String toString() => 'TypeLiteralAccess($type)';
@@ -756,7 +757,8 @@
           // This is an access the implicit 'call' method of a function type.
           return new FunctionCallAccess(receiverElement, unaliasedBound);
         }
-        if (types.isSubtype(interface, commonElements.functionType)) {
+        ResolutionInterfaceType functionType = commonElements.functionType;
+        if (types.isSubtype(interface, functionType)) {
           // This is an access of the special 'call' method implicitly defined
           // on 'Function'. This method can be called with any arguments, which
           // we ensure by giving it the type 'dynamic'.
@@ -1612,7 +1614,7 @@
     return const ResolutionDynamicType();
   }
 
-  ResolutionDartType visitLiteralSymbol(LiteralSymbol node) {
+  ResolutionInterfaceType visitLiteralSymbol(LiteralSymbol node) {
     return commonElements.symbolType;
   }
 
@@ -1700,8 +1702,9 @@
         // The resolver already emitted an error for this expression.
       } else {
         if (currentAsyncMarker == AsyncMarker.ASYNC) {
-          expressionType =
+          ResolutionInterfaceType futureOfFlattenedType =
               commonElements.futureType(types.flatten(expressionType));
+          expressionType = futureOfFlattenedType;
         }
         if (expectedReturnType.isVoid &&
             !types.isAssignable(expressionType, const ResolutionVoidType())) {
@@ -1739,21 +1742,27 @@
     }
   }
 
-  ResolutionDartType visitYield(Yield node) {
+  visitYield(Yield node) {
     ResolutionDartType resultType = analyze(node.expression);
     if (!node.hasStar) {
       if (currentAsyncMarker.isAsync) {
-        resultType = commonElements.streamType(resultType);
+        ResolutionInterfaceType streamOfResultType =
+            commonElements.streamType(resultType);
+        resultType = streamOfResultType;
       } else {
-        resultType = commonElements.iterableType(resultType);
+        ResolutionInterfaceType iterableOfResultType =
+            commonElements.iterableType(resultType);
+        resultType = iterableOfResultType;
       }
     } else {
       if (currentAsyncMarker.isAsync) {
         // The static type of expression must be assignable to Stream.
-        checkAssignable(node, resultType, commonElements.streamType());
+        ResolutionInterfaceType streamType = commonElements.streamType();
+        checkAssignable(node, resultType, streamType);
       } else {
         // The static type of expression must be assignable to Iterable.
-        checkAssignable(node, resultType, commonElements.iterableType());
+        ResolutionInterfaceType iterableType = commonElements.iterableType();
+        checkAssignable(node, resultType, iterableType);
       }
     }
     // The static type of the result must be assignable to the declared type.
@@ -1874,7 +1883,7 @@
     ResolutionDartType elementType = computeForInElementType(node);
     ResolutionDartType expressionType = analyze(node.expression);
     if (resolution.target.supportsAsyncAwait) {
-      ResolutionDartType streamOfDynamic = commonElements.streamType();
+      ResolutionInterfaceType streamOfDynamic = commonElements.streamType();
       if (!types.isAssignable(expressionType, streamOfDynamic)) {
         reportMessage(node.expression, MessageKind.NOT_ASSIGNABLE,
             {'fromType': expressionType, 'toType': streamOfDynamic},
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index cd9e860..5892a00 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -44,12 +44,14 @@
   /// The inferred return type when this result belongs to a function element.
   TypeMask get returnType;
 
-  /// Returns the type of a list allocation [node] (which can be a list
-  /// literal or a list new expression).
-  TypeMask typeOfNewList(Node node);
+  /// Returns the type of a list new expression [node].
+  TypeMask typeOfNewList(Send node);
+
+  /// Returns the type of a list literal [node].
+  TypeMask typeOfListLiteral(LiteralList node);
 
   /// Returns the type of a send [node].
-  TypeMask typeOfSend(Node node);
+  TypeMask typeOfSend(Send node);
 
   /// Returns the type of the operator of a complex send-set [node], for
   /// example, the type of `+` in `a += b`.
@@ -99,10 +101,13 @@
     return mask != null && mask.isEmpty;
   }
 
-  TypeMask typeOfNewList(Node node) =>
+  TypeMask typeOfNewList(Send node) =>
       _inferrer.getTypeForNewList(_owner, node);
 
-  TypeMask typeOfSend(Node node) => _data?.typeOfSend(node);
+  TypeMask typeOfListLiteral(LiteralList node) =>
+      _inferrer.getTypeForNewList(_owner, node);
+
+  TypeMask typeOfSend(Send node) => _data?.typeOfSend(node);
   TypeMask typeOfGetter(SendSet node) => _data?.typeOfGetter(node);
   TypeMask typeOfOperator(SendSet node) => _data?.typeOfOperator(node);
   TypeMask typeOfIterator(ForIn node) => _data?.typeOfIterator(node);
@@ -123,11 +128,11 @@
     _typeMasks[node] = mask;
   }
 
-  TypeMask typeOfSend(Node node) => _get(node);
+  TypeMask typeOfSend(Send node) => _get(node);
   TypeMask typeOfGetter(SendSet node) => _get(node.selector);
   TypeMask typeOfOperator(SendSet node) => _get(node.assignmentOperator);
 
-  void setTypeMask(Node node, TypeMask mask) {
+  void setTypeMask(Send node, TypeMask mask) {
     _set(node, mask);
   }
 
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index a2ad411..0595e8d 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -19,7 +19,14 @@
 import '../closure.dart' show BoxFieldElement;
 import '../common.dart';
 import '../elements/types.dart';
-import '../elements/elements.dart';
+import '../elements/elements.dart'
+    show
+        ConstructorElement,
+        ConstructorBodyElement,
+        Element,
+        Entity,
+        LocalFunctionElement;
+import '../elements/entities.dart';
 import '../util/util.dart' show Hashing;
 import '../world.dart' show World;
 import 'call_structure.dart' show CallStructure;
@@ -41,7 +48,7 @@
 
   DynamicUse(this.selector, this.mask);
 
-  bool appliesUnnamed(Element element, World world) {
+  bool appliesUnnamed(MemberEntity element, World world) {
     return selector.appliesUnnamed(element) &&
         (mask == null || mask.canHit(element, selector, world));
   }
@@ -86,18 +93,17 @@
 // TODO(johnniwinther): Create backend-specific implementations with better
 // invariants.
 class StaticUse {
-  final Element element;
+  final Entity element;
   final StaticUseKind kind;
   final int hashCode;
   final DartType type;
 
-  StaticUse.internal(Element element, StaticUseKind kind,
-      [DartType type = null])
+  StaticUse.internal(Entity element, StaticUseKind kind, [DartType type = null])
       : this.element = element,
         this.kind = kind,
         this.type = type,
         this.hashCode = Hashing.objectsHash(element, kind, type) {
-    assert(invariant(element, element.isDeclaration,
+    assert(invariant(element, !(element is Element && !element.isDeclaration),
         message: "Static use element $element must be "
             "the declaration element."));
   }
@@ -105,7 +111,7 @@
   /// Invocation of a static or top-level [element] with the given
   /// [callStructure].
   factory StaticUse.staticInvoke(
-      MethodElement element, CallStructure callStructure) {
+      FunctionEntity element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static invoke element $element must be a top-level "
@@ -114,7 +120,7 @@
   }
 
   /// Closurization of a static or top-level function [element].
-  factory StaticUse.staticTearOff(MethodElement element) {
+  factory StaticUse.staticTearOff(FunctionEntity element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static tear-off element $element must be a top-level "
             "or static method."));
@@ -122,7 +128,7 @@
   }
 
   /// Read access of a static or top-level field or getter [element].
-  factory StaticUse.staticGet(MemberElement element) {
+  factory StaticUse.staticGet(MemberEntity element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static get element $element must be a top-level "
             "or static method."));
@@ -132,7 +138,7 @@
   }
 
   /// Write access of a static or top-level field or setter [element].
-  factory StaticUse.staticSet(MemberElement element) {
+  factory StaticUse.staticSet(MemberEntity element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static set element $element must be a top-level "
             "or static method."));
@@ -143,7 +149,7 @@
 
   /// Invocation of the lazy initializer for a static or top-level field
   /// [element].
-  factory StaticUse.staticInit(FieldElement element) {
+  factory StaticUse.staticInit(FieldEntity element) {
     assert(invariant(element, element.isStatic || element.isTopLevel,
         message: "Static init element $element must be a top-level "
             "or static method."));
@@ -154,7 +160,7 @@
 
   /// Invocation of a super method [element] with the given [callStructure].
   factory StaticUse.superInvoke(
-      MethodElement element, CallStructure callStructure) {
+      FunctionEntity element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
     assert(invariant(element, element.isInstanceMember,
         message: "Super invoke element $element must be an instance method."));
@@ -162,7 +168,7 @@
   }
 
   /// Read access of a super field or getter [element].
-  factory StaticUse.superGet(MemberElement element) {
+  factory StaticUse.superGet(MemberEntity element) {
     assert(invariant(element, element.isInstanceMember,
         message: "Super get element $element must be an instance method."));
     assert(invariant(element, element.isField || element.isGetter,
@@ -171,7 +177,7 @@
   }
 
   /// Write access of a super field [element].
-  factory StaticUse.superFieldSet(FieldElement element) {
+  factory StaticUse.superFieldSet(FieldEntity element) {
     assert(invariant(element, element.isInstanceMember,
         message: "Super set element $element must be an instance method."));
     assert(invariant(element, element.isField,
@@ -180,7 +186,7 @@
   }
 
   /// Write access of a super setter [element].
-  factory StaticUse.superSetterSet(SetterElement element) {
+  factory StaticUse.superSetterSet(FunctionEntity element) {
     assert(invariant(element, element.isInstanceMember,
         message: "Super set element $element must be an instance method."));
     assert(invariant(element, element.isSetter,
@@ -189,7 +195,7 @@
   }
 
   /// Closurization of a super method [element].
-  factory StaticUse.superTearOff(MethodElement element) {
+  factory StaticUse.superTearOff(FunctionEntity element) {
     assert(invariant(element, element.isInstanceMember && element.isFunction,
         message: "Super invoke element $element must be an instance method."));
     return new StaticUse.internal(element, StaticUseKind.SUPER_TEAR_OFF);
@@ -198,7 +204,7 @@
   /// Invocation of a constructor [element] through a this or super
   /// constructor call with the given [callStructure].
   factory StaticUse.superConstructorInvoke(
-      Element element, CallStructure callStructure) {
+      ConstructorElement element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
     assert(invariant(element, element.isGenerativeConstructor,
         message: "Constructor invoke element $element must be a "
@@ -216,7 +222,7 @@
 
   /// Direct invocation of a method [element] with the given [callStructure].
   factory StaticUse.directInvoke(
-      MethodElement element, CallStructure callStructure) {
+      FunctionEntity element, CallStructure callStructure) {
     // TODO(johnniwinther): Use the [callStructure].
     assert(invariant(element, element.isInstanceMember,
         message: "Direct invoke element $element must be an instance member."));
@@ -226,7 +232,7 @@
   }
 
   /// Direct read access of a field or getter [element].
-  factory StaticUse.directGet(MemberElement element) {
+  factory StaticUse.directGet(MemberEntity element) {
     assert(invariant(element, element.isInstanceMember,
         message: "Direct get element $element must be an instance member."));
     assert(invariant(element, element.isField || element.isGetter,
@@ -235,7 +241,7 @@
   }
 
   /// Direct write access of a field [element].
-  factory StaticUse.directSet(FieldElement element) {
+  factory StaticUse.directSet(FieldEntity element) {
     assert(invariant(element, element.isInstanceMember,
         message: "Direct set element $element must be an instance member."));
     assert(invariant(element, element.isField,
@@ -245,7 +251,10 @@
 
   /// Constructor invocation of [element] with the given [callStructure].
   factory StaticUse.constructorInvoke(
-      ConstructorElement element, CallStructure callStructure) {
+      FunctionEntity element, CallStructure callStructure) {
+    assert(invariant(element, element.isConstructor,
+        message: "Constructor invocation element $element "
+            "must be a constructor."));
     // TODO(johnniwinther): Use the [callStructure].
     return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
@@ -253,9 +262,12 @@
   /// Constructor invocation of [element] with the given [callStructure] on
   /// [type].
   factory StaticUse.typedConstructorInvoke(
-      ConstructorElement element, CallStructure callStructure, DartType type) {
+      FunctionEntity element, CallStructure callStructure, DartType type) {
     assert(invariant(element, type != null,
         message: "No type provided for constructor invocation."));
+    assert(invariant(element, element.isConstructor,
+        message: "Typed constructor invocation element $element "
+            "must be a constructor."));
     // TODO(johnniwinther): Use the [callStructure].
     return new StaticUse.internal(
         element, StaticUseKind.CONSTRUCTOR_INVOKE, type);
@@ -264,9 +276,12 @@
   /// Constant constructor invocation of [element] with the given
   /// [callStructure] on [type].
   factory StaticUse.constConstructorInvoke(
-      ConstructorElement element, CallStructure callStructure, DartType type) {
+      FunctionEntity element, CallStructure callStructure, DartType type) {
     assert(invariant(element, type != null,
         message: "No type provided for constructor invocation."));
+    assert(invariant(element, element.isConstructor,
+        message: "Const constructor invocation element $element "
+            "must be a constructor."));
     // TODO(johnniwinther): Use the [callStructure].
     return new StaticUse.internal(
         element, StaticUseKind.CONST_CONSTRUCTOR_INVOKE, type);
@@ -274,21 +289,24 @@
 
   /// Constructor redirection to [element] on [type].
   factory StaticUse.constructorRedirect(
-      ConstructorElement element, InterfaceType type) {
+      FunctionEntity element, InterfaceType type) {
     assert(invariant(element, type != null,
-        message: "No type provided for constructor invocation."));
+        message: "No type provided for constructor redirection."));
+    assert(invariant(element, element.isConstructor,
+        message: "Constructor redirection element $element "
+            "must be a constructor."));
     return new StaticUse.internal(element, StaticUseKind.REDIRECTION, type);
   }
 
   /// Initialization of an instance field [element].
-  factory StaticUse.fieldInit(FieldElement element) {
+  factory StaticUse.fieldInit(FieldEntity element) {
     assert(invariant(element, element.isInstanceMember,
         message: "Field init element $element must be an instance field."));
     return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Read access of an instance field or boxed field [element].
-  factory StaticUse.fieldGet(FieldElement element) {
+  factory StaticUse.fieldGet(FieldEntity element) {
     assert(invariant(
         element, element.isInstanceMember || element is BoxFieldElement,
         message: "Field init element $element must be an instance "
@@ -297,7 +315,7 @@
   }
 
   /// Write access of an instance field or boxed field [element].
-  factory StaticUse.fieldSet(FieldElement element) {
+  factory StaticUse.fieldSet(FieldEntity element) {
     assert(invariant(
         element, element.isInstanceMember || element is BoxFieldElement,
         message: "Field init element $element must be an instance "
@@ -311,13 +329,16 @@
   }
 
   /// Unknown use of [element].
+  ///
+  /// Avoid using this, if possible: Use one of the other constructor which more
+  /// precisely capture why [element] is used.
   @deprecated
-  factory StaticUse.foreignUse(Element element) {
+  factory StaticUse.foreignUse(Entity element) {
     return new StaticUse.internal(element, StaticUseKind.GENERAL);
   }
 
   /// Direct use of [element] as done with `--analyze-all` and `--analyze-main`.
-  factory StaticUse.directUse(Element element) {
+  factory StaticUse.directUse(Entity element) {
     return new StaticUse.internal(element, StaticUseKind.DIRECT_USE);
   }
 
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index 8302d84..a201a73 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -13,9 +13,10 @@
 import '../common/resolution.dart' show Resolution;
 import '../compiler.dart' show Compiler;
 import '../core_types.dart';
-import '../elements/resolution_types.dart';
 import '../elements/elements.dart';
 import '../elements/entities.dart';
+import '../elements/resolution_types.dart';
+import '../elements/types.dart';
 import '../universe/class_set.dart';
 import '../universe/function_set.dart' show FunctionSetBuilder;
 import '../util/enumset.dart';
@@ -1113,6 +1114,11 @@
   void forEachInstanceField(
       ClassEntity cls, void f(ClassEntity declarer, FieldEntity field));
 
+  /// Calls [f] for each parameter of [function] providing the type and name of
+  /// the parameter.
+  void forEachParameter(
+      FunctionEntity function, void f(DartType type, String name));
+
   void forEachInvokedName(
       f(String name, Map<Selector, SelectorConstraints> selectors));
 
@@ -1234,6 +1240,15 @@
         .forEachInstanceField(f, includeSuperAndInjectedMembers: true);
   }
 
+  @override
+  void forEachParameter(
+      MethodElement function, void f(DartType type, String name)) {
+    FunctionSignature parameters = function.functionSignature;
+    parameters.forEachParameter((ParameterElement parameter) {
+      f(parameter.type, parameter.name);
+    });
+  }
+
   Iterable<ClassElement> get processedClasses => _processedClasses.keys
       .where((cls) => _processedClasses[cls].isInstantiated);
 
diff --git a/pkg/dev_compiler/lib/js/amd/dart_sdk.js b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
index 5f518fc..bfa802af 100644
--- a/pkg/dev_compiler/lib/js/amd/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
@@ -167,6 +167,8 @@
   let _AsyncBroadcastStreamController = () => (_AsyncBroadcastStreamController = dart.constFn(async._AsyncBroadcastStreamController$()))();
   let _AsBroadcastStreamController = () => (_AsBroadcastStreamController = dart.constFn(async._AsBroadcastStreamController$()))();
   let _DoneSubscription = () => (_DoneSubscription = dart.constFn(async._DoneSubscription$()))();
+  let FutureOr = () => (FutureOr = dart.constFn(async.FutureOr$()))();
+  let dynamicToFutureOr = () => (dynamicToFutureOr = dart.constFn(dart.functionType(async.FutureOr, [dart.dynamic])))();
   let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.functionType(dart.dynamic, [])))();
   let Future = () => (Future = dart.constFn(async.Future$()))();
   let Completer = () => (Completer = dart.constFn(async.Completer$()))();
@@ -387,14 +389,20 @@
   let ListOfListOfint = () => (ListOfListOfint = dart.constFn(core.List$(ListOfint())))();
   let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))();
   let FutureOfDirectory = () => (FutureOfDirectory = dart.constFn(async.Future$(io.Directory)))();
+  let FutureOrOfDirectory = () => (FutureOrOfDirectory = dart.constFn(async.FutureOr$(io.Directory)))();
   let StreamOfFileSystemEntity = () => (StreamOfFileSystemEntity = dart.constFn(async.Stream$(io.FileSystemEntity)))();
   let JSArrayOfFileSystemEntity = () => (JSArrayOfFileSystemEntity = dart.constFn(_interceptors.JSArray$(io.FileSystemEntity)))();
+  let FutureOrOfString = () => (FutureOrOfString = dart.constFn(async.FutureOr$(core.String)))();
+  let FutureOrOfbool = () => (FutureOrOfbool = dart.constFn(async.FutureOr$(core.bool)))();
+  let FutureOrOfint = () => (FutureOrOfint = dart.constFn(async.FutureOr$(core.int)))();
   let ListOfFileSystemEntity = () => (ListOfFileSystemEntity = dart.constFn(core.List$(io.FileSystemEntity)))();
   let StreamControllerOfListOfint = () => (StreamControllerOfListOfint = dart.constFn(async.StreamController$(ListOfint())))();
   let FutureOfRandomAccessFile = () => (FutureOfRandomAccessFile = dart.constFn(async.Future$(io.RandomAccessFile)))();
   let CompleterOfFile = () => (CompleterOfFile = dart.constFn(async.Completer$(io.File)))();
   let FutureOfListOfint = () => (FutureOfListOfint = dart.constFn(async.Future$(ListOfint())))();
+  let FutureOrOfFile = () => (FutureOrOfFile = dart.constFn(async.FutureOr$(io.File)))();
   let FutureOfFile = () => (FutureOfFile = dart.constFn(async.Future$(io.File)))();
+  let FutureOrOfListOfint = () => (FutureOrOfListOfint = dart.constFn(async.FutureOr$(ListOfint())))();
   let ListOfFileSystemEntityType = () => (ListOfFileSystemEntityType = dart.constFn(core.List$(io.FileSystemEntityType)))();
   let StreamOfHttpRequest = () => (StreamOfHttpRequest = dart.constFn(async.Stream$(io.HttpRequest)))();
   let ListOfRedirectInfo = () => (ListOfRedirectInfo = dart.constFn(core.List$(io.RedirectInfo)))();
@@ -403,6 +411,7 @@
   let StringAndListOfStringTovoid = () => (StringAndListOfStringTovoid = dart.constFn(dart.functionType(dart.void, [core.String, ListOfString()])))();
   let FutureOfHttpClientResponse = () => (FutureOfHttpClientResponse = dart.constFn(async.Future$(io.HttpClientResponse)))();
   let StreamSubscriptionOfListOfint = () => (StreamSubscriptionOfListOfint = dart.constFn(async.StreamSubscription$(ListOfint())))();
+  let FutureOrOfHttpClientResponse = () => (FutureOrOfHttpClientResponse = dart.constFn(async.FutureOr$(io.HttpClientResponse)))();
   let _StreamSinkImpl = () => (_StreamSinkImpl = dart.constFn(io._StreamSinkImpl$()))();
   let StreamConsumerOfListOfint = () => (StreamConsumerOfListOfint = dart.constFn(async.StreamConsumer$(ListOfint())))();
   let _HttpOutboundMessage = () => (_HttpOutboundMessage = dart.constFn(io._HttpOutboundMessage$()))();
@@ -414,11 +423,13 @@
   let FutureOfSecureSocket = () => (FutureOfSecureSocket = dart.constFn(async.Future$(io.SecureSocket)))();
   let HashSetOf_HttpClientConnection = () => (HashSetOf_HttpClientConnection = dart.constFn(collection.HashSet$(io._HttpClientConnection)))();
   let FutureOf_ConnectionInfo = () => (FutureOf_ConnectionInfo = dart.constFn(async.Future$(io._ConnectionInfo)))();
+  let FutureOrOf_ConnectionInfo = () => (FutureOrOf_ConnectionInfo = dart.constFn(async.FutureOr$(io._ConnectionInfo)))();
   let SetOf_HttpClientConnection = () => (SetOf_HttpClientConnection = dart.constFn(core.Set$(io._HttpClientConnection)))();
   let HashMapOfString$_ConnectionTarget = () => (HashMapOfString$_ConnectionTarget = dart.constFn(collection.HashMap$(core.String, io._ConnectionTarget)))();
   let JSArrayOf_Credentials = () => (JSArrayOf_Credentials = dart.constFn(_interceptors.JSArray$(io._Credentials)))();
   let JSArrayOf_ProxyCredentials = () => (JSArrayOf_ProxyCredentials = dart.constFn(_interceptors.JSArray$(io._ProxyCredentials)))();
   let FutureOf_HttpClientRequest = () => (FutureOf_HttpClientRequest = dart.constFn(async.Future$(io._HttpClientRequest)))();
+  let FutureOrOf_HttpClientRequest = () => (FutureOrOf_HttpClientRequest = dart.constFn(async.FutureOr$(io._HttpClientRequest)))();
   let X509CertificateAndStringAndintTobool = () => (X509CertificateAndStringAndintTobool = dart.constFn(dart.functionType(core.bool, [io.X509Certificate, core.String, core.int])))();
   let FutureOfbool = () => (FutureOfbool = dart.constFn(async.Future$(core.bool)))();
   let UriAndStringAndStringToFutureOfbool = () => (UriAndStringAndStringToFutureOfbool = dart.constFn(dart.functionType(FutureOfbool(), [core.Uri, core.String, core.String])))();
@@ -546,6 +557,7 @@
   let EventStreamProviderOfMidiMessageEvent = () => (EventStreamProviderOfMidiMessageEvent = dart.constFn(html$.EventStreamProvider$(html$.MidiMessageEvent)))();
   let ListOfMimeType = () => (ListOfMimeType = dart.constFn(core.List$(html$.MimeType)))();
   let ListOfMutationRecord = () => (ListOfMutationRecord = dart.constFn(core.List$(html$.MutationRecord)))();
+  let _wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = () => (_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = dart.constFn(html$._wrapZoneBinaryCallback$(ListOfMutationRecord(), html$.MutationObserver, dart.void)))();
   let MapOfString$bool = () => (MapOfString$bool = dart.constFn(core.Map$(core.String, core.bool)))();
   let CompleterOfMediaStream = () => (CompleterOfMediaStream = dart.constFn(async.Completer$(html$.MediaStream)))();
   let NodeTobool = () => (NodeTobool = dart.constFn(dart.functionType(core.bool, [html$.Node])))();
@@ -633,6 +645,7 @@
   let dynamicTodynamic$ = () => (dynamicTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
   let StringAndStringToint = () => (StringAndStringToint = dart.constFn(dart.definiteFunctionType(core.int, [core.String, core.String])))();
   let VoidTo_MethodStats = () => (VoidTo_MethodStats = dart.constFn(dart.definiteFunctionType(dart._MethodStats, [])))();
+  let VoidToFunctionType = () => (VoidToFunctionType = dart.constFn(dart.definiteFunctionType(dart.FunctionType, [])))();
   let dynamicToString = () => (dynamicToString = dart.constFn(dart.definiteFunctionType(core.String, [dart.dynamic])))();
   let dynamicToListOfString = () => (dynamicToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [dart.dynamic])))();
   let dynamicToList = () => (dynamicToList = dart.constFn(dart.definiteFunctionType(core.List, [dart.dynamic])))();
@@ -668,8 +681,9 @@
   let VoidTobool = () => (VoidTobool = dart.constFn(dart.definiteFunctionType(core.bool, [])))();
   let VoidTo_IsolateContext = () => (VoidTo_IsolateContext = dart.constFn(dart.definiteFunctionType(_isolate_helper._IsolateContext, [])))();
   let VoidTovoid$ = () => (VoidTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
-  let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.List])))();
+  let ListToFutureOr = () => (ListToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [core.List])))();
   let StringTodynamic = () => (StringTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.String])))();
+  let dynamicToFutureOr$ = () => (dynamicToFutureOr$ = dart.constFn(dart.definiteFunctionType(async.FutureOr, [dart.dynamic])))();
   let TimerTovoid$ = () => (TimerTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [async.Timer])))();
   let dynamicToFuture = () => (dynamicToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [dart.dynamic])))();
   let boolTodynamic = () => (boolTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.bool])))();
@@ -795,11 +809,15 @@
   let ListAndintAndintTo_BufferAndStart = () => (ListAndintAndintTo_BufferAndStart = dart.constFn(dart.definiteFunctionType(io._BufferAndStart, [core.List, core.int, core.int])))();
   let intTovoid = () => (intTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.int])))();
   let DirectoryToFutureOfDirectory = () => (DirectoryToFutureOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOfDirectory(), [io.Directory])))();
+  let boolToFutureOrOfDirectory = () => (boolToFutureOrOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOrOfDirectory(), [core.bool])))();
   let dynamicTo_Directory = () => (dynamicTo_Directory = dart.constFn(dart.definiteFunctionType(io._Directory, [dart.dynamic])))();
   let dynamicToDirectory = () => (dynamicToDirectory = dart.constFn(dart.definiteFunctionType(io.Directory, [dart.dynamic])))();
-  let ListOfintTodynamic = () => (ListOfintTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [ListOfint()])))();
+  let dynamicToFutureOrOfString = () => (dynamicToFutureOrOfString = dart.constFn(dart.definiteFunctionType(FutureOrOfString(), [dart.dynamic])))();
+  let dynamicToFutureOrOfbool = () => (dynamicToFutureOrOfbool = dart.constFn(dart.definiteFunctionType(FutureOrOfbool(), [dart.dynamic])))();
+  let dynamicToFutureOrOfint = () => (dynamicToFutureOrOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfint(), [dart.dynamic])))();
+  let ListOfintToFutureOr = () => (ListOfintToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [ListOfint()])))();
   let RandomAccessFileTovoid = () => (RandomAccessFileTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.RandomAccessFile])))();
-  let RandomAccessFileTodynamic = () => (RandomAccessFileTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RandomAccessFile])))();
+  let RandomAccessFileToFutureOr = () => (RandomAccessFileToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RandomAccessFile])))();
   let ListOfintTovoid$ = () => (ListOfintTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint()])))();
   let RandomAccessFileToFutureOfRandomAccessFile = () => (RandomAccessFileToFutureOfRandomAccessFile = dart.constFn(dart.definiteFunctionType(FutureOfRandomAccessFile(), [io.RandomAccessFile])))();
   let dynamicTo_File = () => (dynamicTo_File = dart.constFn(dart.definiteFunctionType(io._File, [dart.dynamic])))();
@@ -813,6 +831,8 @@
   let ListOfintToString = () => (ListOfintToString = dart.constFn(dart.definiteFunctionType(core.String, [ListOfint()])))();
   let RandomAccessFileTo_File = () => (RandomAccessFileTo_File = dart.constFn(dart.definiteFunctionType(io._File, [io.RandomAccessFile])))();
   let RandomAccessFileToObject = () => (RandomAccessFileToObject = dart.constFn(dart.definiteFunctionType(core.Object, [io.RandomAccessFile])))();
+  let RandomAccessFileToFutureOrOfFile = () => (RandomAccessFileToFutureOrOfFile = dart.constFn(dart.definiteFunctionType(FutureOrOfFile(), [io.RandomAccessFile])))();
+  let dynamicToFutureOrOfListOfint = () => (dynamicToFutureOrOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfListOfint(), [dart.dynamic])))();
   let dynamicToFileStat = () => (dynamicToFileStat = dart.constFn(dart.definiteFunctionType(io.FileStat, [dart.dynamic])))();
   let StringAndListOfStringToListOfString = () => (StringAndListOfStringToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [core.String, ListOfString()])))();
   let StringAndListOfStringTovoid$ = () => (StringAndListOfStringTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, ListOfString()])))();
@@ -825,22 +845,25 @@
   let _AuthenticationSchemeTo_Credentials = () => (_AuthenticationSchemeTo_Credentials = dart.constFn(dart.definiteFunctionType(io._Credentials, [io._AuthenticationScheme])))();
   let _CredentialsTovoid = () => (_CredentialsTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io._Credentials])))();
   let _AuthenticationSchemeAndStringToFuture = () => (_AuthenticationSchemeAndStringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [io._AuthenticationScheme, core.String])))();
+  let dynamicToFutureOrOfHttpClientResponse = () => (dynamicToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [dart.dynamic])))();
   let CookieTovoid = () => (CookieTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.Cookie])))();
+  let ListToFutureOrOfHttpClientResponse = () => (ListToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [core.List])))();
   let HttpClientResponseTovoid = () => (HttpClientResponseTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.HttpClientResponse])))();
   let dynamicToIterable = () => (dynamicToIterable = dart.constFn(dart.definiteFunctionType(core.Iterable, [dart.dynamic])))();
   let dynamicTo_HttpOutboundMessage = () => (dynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic])))();
   let dynamicAnddynamicTo_HttpOutboundMessage = () => (dynamicAnddynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic, dart.dynamic])))();
   let dynamic__Todynamic$ = () => (dynamic__Todynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [core.StackTrace])))();
   let _HttpIncomingTovoid$ = () => (_HttpIncomingTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [io._HttpIncoming])))();
-  let _HttpIncomingTodynamic = () => (_HttpIncomingTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._HttpIncoming])))();
+  let _HttpIncomingToFutureOr = () => (_HttpIncomingToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._HttpIncoming])))();
   let dynamicTo_DetachedSocket = () => (dynamicTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic])))();
   let SecureSocketTo_HttpClientConnection = () => (SecureSocketTo_HttpClientConnection = dart.constFn(dart.definiteFunctionType(io._HttpClientConnection, [io.SecureSocket])))();
   let HttpClientResponseToFutureOfSecureSocket = () => (HttpClientResponseToFutureOfSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfSecureSocket(), [io.HttpClientResponse])))();
   let X509CertificateTobool$ = () => (X509CertificateTobool$ = dart.constFn(dart.definiteFunctionType(core.bool, [io.X509Certificate])))();
   let _HttpClientConnectionTo_ConnectionInfo = () => (_HttpClientConnectionTo_ConnectionInfo = dart.constFn(dart.definiteFunctionType(io._ConnectionInfo, [io._HttpClientConnection])))();
+  let dynamicToFutureOrOf_ConnectionInfo = () => (dynamicToFutureOrOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOrOf_ConnectionInfo(), [dart.dynamic])))();
   let _ConnectionTargetTobool = () => (_ConnectionTargetTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io._ConnectionTarget])))();
   let _ConnectionInfoTo_HttpClientRequest = () => (_ConnectionInfoTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._ConnectionInfo])))();
-  let _ConnectionInfoTodynamic = () => (_ConnectionInfoTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._ConnectionInfo])))();
+  let _ConnectionInfoToFutureOrOf_HttpClientRequest = () => (_ConnectionInfoToFutureOrOf_HttpClientRequest = dart.constFn(dart.definiteFunctionType(FutureOrOf_HttpClientRequest(), [io._ConnectionInfo])))();
   let _HttpClientRequestTo_HttpClientRequest = () => (_HttpClientRequestTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._HttpClientRequest])))();
   let VoidTo_ConnectionTarget = () => (VoidTo_ConnectionTarget = dart.constFn(dart.definiteFunctionType(io._ConnectionTarget, [])))();
   let dynamicToFutureOf_ConnectionInfo = () => (dynamicToFutureOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOf_ConnectionInfo(), [dart.dynamic])))();
@@ -863,9 +886,9 @@
   let RawSecureSocketToSecureSocket = () => (RawSecureSocketToSecureSocket = dart.constFn(dart.definiteFunctionType(io.SecureSocket, [io.RawSecureSocket])))();
   let dynamicToFutureOfRawSecureSocket = () => (dynamicToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [dart.dynamic])))();
   let RawServerSocketToRawSecureServerSocket = () => (RawServerSocketToRawSecureServerSocket = dart.constFn(dart.definiteFunctionType(io.RawSecureServerSocket, [io.RawServerSocket])))();
-  let RawSecureSocketTodynamic = () => (RawSecureSocketTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RawSecureSocket])))();
+  let RawSecureSocketToFutureOr = () => (RawSecureSocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RawSecureSocket])))();
   let RawSocketToFutureOfRawSecureSocket = () => (RawSocketToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [io.RawSocket])))();
-  let _FilterStatusTodynamic = () => (_FilterStatusTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._FilterStatus])))();
+  let _FilterStatusToFutureOr = () => (_FilterStatusToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._FilterStatus])))();
   let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.int, [core.int])))();
   let dynamicTo_FilterStatus = () => (dynamicTo_FilterStatus = dart.constFn(dart.definiteFunctionType(io._FilterStatus, [dart.dynamic])))();
   let ListOfintAndStringTovoid = () => (ListOfintAndStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint(), core.String])))();
@@ -877,6 +900,7 @@
   let StringToFuture = () => (StringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [core.String])))();
   let EventSinkOfListOfintTo_WebSocketOutgoingTransformer = () => (EventSinkOfListOfintTo_WebSocketOutgoingTransformer = dart.constFn(dart.definiteFunctionType(io._WebSocketOutgoingTransformer, [EventSinkOfListOfint()])))();
   let dynamicTo_WebSocketImpl = () => (dynamicTo_WebSocketImpl = dart.constFn(dart.definiteFunctionType(io._WebSocketImpl, [dart.dynamic])))();
+  let SocketToFutureOr = () => (SocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.Socket])))();
   let HttpClientResponseToFutureOfWebSocket = () => (HttpClientResponseToFutureOfWebSocket = dart.constFn(dart.definiteFunctionType(FutureOfWebSocket(), [io.HttpClientResponse])))();
   let HttpClientRequestToFutureOfHttpClientResponse = () => (HttpClientRequestToFutureOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOfHttpClientResponse(), [io.HttpClientRequest])))();
   let dynamicToMap = () => (dynamicToMap = dart.constFn(dart.definiteFunctionType(core.Map, [dart.dynamic])))();
@@ -899,7 +923,7 @@
   let EventTovoid$ = () => (EventTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [html$.Event])))();
   let RequestToFutureOfT = () => (RequestToFutureOfT = dart.constFn(dart.definiteFunctionType(T => [async.Future$(T), [indexed_db.Request]])))();
   let dynamicToTo = () => (dynamicToTo = dart.constFn(dart.definiteFunctionType(To => [To, [dart.dynamic]])))();
-  let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
+  let EventToFutureOr = () => (EventToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [html$.Event])))();
   let NodeTobool$ = () => (NodeTobool$ = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Node])))();
   let MapOfString$dynamicTobool = () => (MapOfString$dynamicTobool = dart.constFn(dart.definiteFunctionType(core.bool, [MapOfString$dynamic()])))();
   let UriAndListOfStringAnddynamicToFutureOfIsolate = () => (UriAndListOfStringAnddynamicToFutureOfIsolate = dart.constFn(dart.definiteFunctionType(FutureOfIsolate(), [core.Uri, ListOfString(), dart.dynamic])))();
@@ -933,6 +957,7 @@
   let SetOfStringTobool = () => (SetOfStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [SetOfString()])))();
   let SetOfStringTovoid = () => (SetOfStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [SetOfString()])))();
   let EventAndStringTobool = () => (EventAndStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Event, core.String])))();
+  let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
   let KeyEventTobool = () => (KeyEventTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.KeyEvent])))();
   let NodeValidatorTobool = () => (NodeValidatorTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.NodeValidator])))();
   let NodeAndNodeToint = () => (NodeAndNodeToint = dart.constFn(dart.definiteFunctionType(core.int, [html$.Node, html$.Node])))();
@@ -972,6 +997,27 @@
           dart.copyProperties(s, m[dart._methodSig]);
         }
         return s;
+      },
+      fields: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._fieldSig]);
+        }
+        return s;
+      },
+      getters: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._getterSig]);
+        }
+        return s;
+      },
+      setters: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._setterSig]);
+        }
+        return s;
       }
     });
     Mixin[dart._mixins] = mixins;
@@ -1074,15 +1120,24 @@
   dart.getGenericTypeCtor = function(value) {
     return value[dart._genericTypeCtor];
   };
-  dart.getMethodType = function(obj, name) {
-    let type = obj == null ? core.Object : obj.__proto__.constructor;
-    return dart.getMethodTypeFromType(type, name);
+  dart.getType = function(obj) {
+    return obj == null ? core.Object : obj.__proto__.constructor;
   };
-  dart.getMethodTypeFromType = function(type, name) {
+  dart.getMethodType = function(type, name) {
     let sigObj = type[dart._methodSig];
     if (sigObj === void 0) return void 0;
     return sigObj[name];
   };
+  dart.getFieldType = function(type, name) {
+    let sigObj = type[dart._fieldSig];
+    if (sigObj === void 0) return void 0;
+    return sigObj[name];
+  };
+  dart.getSetterType = function(type, name) {
+    let sigObj = type[dart._setterSig];
+    if (sigObj === void 0) return void 0;
+    return sigObj[name];
+  };
   dart.classGetConstructorType = function(cls, name) {
     if (!name) name = 'new';
     if (cls === void 0) return void 0;
@@ -1094,7 +1149,7 @@
   dart.bind = function(obj, name, f) {
     if (f === void 0) f = obj[name];
     f = f.bind(obj);
-    let sig = dart.getMethodType(obj, name);
+    let sig = dart.getMethodType(dart.getType(obj), name);
     dart.assert(sig);
     dart.tag(f, sig);
     return f;
@@ -1108,7 +1163,8 @@
   dart._setInstanceSignature = function(f, sigF, kind) {
     dart.defineMemoizedGetter(f, kind, () => {
       let sigObj = sigF();
-      sigObj.__proto__ = f.__proto__[kind];
+      let proto = f.__proto__;
+      sigObj.__proto__ = kind in proto ? proto[kind] : null;
       return sigObj;
     });
   };
@@ -1169,8 +1225,22 @@
     dart._setStaticSetterSignature(f, staticSetters);
     dart._setStaticTypes(f, names);
   };
-  dart.hasMethod = function(obj, name) {
-    return dart.getMethodType(obj, name) !== void 0;
+  dart._hasSigEntry = function(type, sigF, name) {
+    let sigObj = type[sigF];
+    if (sigObj === void 0) return false;
+    return name in sigObj;
+  };
+  dart.hasMethod = function(type, name) {
+    return dart._hasSigEntry(type, dart._methodSig, name);
+  };
+  dart.hasGetter = function(type, name) {
+    return dart._hasSigEntry(type, dart._getterSig, name);
+  };
+  dart.hasSetter = function(type, name) {
+    return dart._hasSigEntry(type, dart._setterSig, name);
+  };
+  dart.hasField = function(type, name) {
+    return dart._hasSigEntry(type, dart._fieldSig, name);
   };
   dart.defineNamedConstructor = function(clazz, name) {
     let proto = clazz.prototype;
@@ -1231,9 +1301,15 @@
     if (!jsProto) return;
     jsProto[dart._extensionType] = dartExtType;
     dart._installProperties(jsProto, extProto);
-    let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, dart._methodSig).get;
-    dart.assert(originalSigFn);
-    dart.defineMemoizedGetter(jsType, dart._methodSig, originalSigFn);
+    function updateSig(sigF) {
+      let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, sigF).get;
+      dart.assert(originalSigFn);
+      dart.defineMemoizedGetter(jsType, sigF, originalSigFn);
+    }
+    updateSig(dart._methodSig);
+    updateSig(dart._fieldSig);
+    updateSig(dart._getterSig);
+    updateSig(dart._setterSig);
   };
   dart.defineExtensionMembers = function(type, methodNames) {
     let proto = type.prototype;
@@ -1241,14 +1317,23 @@
       let method = dart.getOwnPropertyDescriptor(proto, name);
       dart.defineProperty(proto, dart.getExtensionSymbol(name), method);
     }
-    let originalSigFn = dart.getOwnPropertyDescriptor(type, dart._methodSig).get;
-    dart.defineMemoizedGetter(type, dart._methodSig, function() {
-      let sig = originalSigFn();
-      for (let name of methodNames) {
-        sig[dart.getExtensionSymbol(name)] = sig[name];
-      }
-      return sig;
-    });
+    function upgradeSig(sigF) {
+      let originalSigFn = dart.getOwnPropertyDescriptor(type, sigF).get;
+      dart.defineMemoizedGetter(type, sigF, function() {
+        let sig = originalSigFn();
+        let propertyNames = Object.getOwnPropertyNames(sig);
+        for (let name of methodNames) {
+          if (name in sig) {
+            sig[dart.getExtensionSymbol(name)] = sig[name];
+          }
+        }
+        return sig;
+      });
+    }
+    upgradeSig(dart._methodSig);
+    upgradeSig(dart._fieldSig);
+    upgradeSig(dart._getterSig);
+    upgradeSig(dart._setterSig);
   };
   dart.setType = function(obj, type) {
     obj.__proto__ = type.prototype;
@@ -1449,6 +1534,65 @@
       return dart._asInstanceOfLazyJSType(object, this);
     };
   };
+  dart._memoizeArray = function(map, arr, create) {
+    let len = arr.length;
+    map = dart._lookupNonTerminal(map, len);
+    for (var i = 0; i < len - 1; ++i) {
+      map = dart._lookupNonTerminal(map, arr[i]);
+    }
+    let result = map.get(arr[len - 1]);
+    if (result !== void 0) return result;
+    map.set(arr[len - 1], result = create());
+    return result;
+  };
+  dart._normalizeParameter = function(a) {
+    if (a instanceof Array) {
+      let result = [];
+      result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
+      result.push(a.slice(1));
+      return result;
+    }
+    return a == dart.dynamic ? dart.bottom : a;
+  };
+  dart._canonicalizeArray = function(definite, array, map) {
+    let arr = definite ? array : array.map(dart._normalizeParameter);
+    return dart._memoizeArray(map, arr, () => arr);
+  };
+  dart._canonicalizeNamed = function(definite, named, map) {
+    let key = [];
+    let names = dart.getOwnPropertyNames(named);
+    let r = {};
+    for (var i = 0; i < names.length; ++i) {
+      let name = names[i];
+      let type = named[name];
+      if (!definite) r[name] = type = dart._normalizeParameter(type);
+      key.push(name);
+      key.push(type);
+    }
+    if (!definite) named = r;
+    return dart._memoizeArray(map, key, () => named);
+  };
+  dart._lookupNonTerminal = function(map, key) {
+    let result = map.get(key);
+    if (result !== void 0) return result;
+    map.set(key, result = new Map());
+    return result;
+  };
+  dart._createSmall = function(count, definite, returnType, required) {
+    let map = dart._fnTypeSmallMap[count];
+    let args = definite ? required : required.map(dart._normalizeParameter);
+    for (var i = 0; i < count; ++i) {
+      map = dart._lookupNonTerminal(map, args[i]);
+    }
+    let result = map.get(returnType);
+    if (result !== void 0) return result;
+    result = new dart.FunctionType(returnType, args, [], {});
+    map.set(returnType, result);
+    return result;
+  };
+  dart.typedef = function(name, closure) {
+    return new dart.Typedef(name, closure);
+  };
   dart._functionType = function(definite, returnType, args, extra) {
     if (args === void 0 && extra === void 0) {
       const fnTypeParts = returnType;
@@ -1467,9 +1611,6 @@
   dart.definiteFunctionType = function(returnType, args, extra) {
     return dart._functionType(true, returnType, args, extra);
   };
-  dart.typedef = function(name, closure) {
-    return new dart.Typedef(name, closure);
-  };
   dart.typeName = function(type) {
     if (type === void 0) return "undefined type";
     if (type === null) return "null type";
@@ -1505,17 +1646,17 @@
   };
   dart.getImplicitFunctionType = function(type) {
     if (dart.test(dart.isFunctionType(type))) return type;
-    return dart.getMethodTypeFromType(type, 'call');
+    return dart.getMethodType(type, 'call');
   };
   dart.isFunctionType = function(type) {
     return type instanceof dart.AbstractFunctionType || type === core.Function;
   };
-  dart.isLazyJSSubtype = function(t1, t2, covariant) {
+  dart.isLazyJSSubtype = function(t1, t2, isCovariant) {
     if (dart.equals(t1, t2)) return true;
     if (t1[_jsTypeCallback] == null || t2[_jsTypeCallback] == null) return true;
-    return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], covariant);
+    return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], isCovariant);
   };
-  dart.isFunctionSubtype = function(ft1, ft2, covariant) {
+  dart.isFunctionSubtype = function(ft1, ft2, isCovariant) {
     if (ft2 === core.Function) {
       return true;
     }
@@ -1527,26 +1668,26 @@
     let args1 = ft1.args;
     let args2 = ft2.args;
     if (args1.length > args2.length) {
-      return covariant ? false : null;
+      return isCovariant ? false : null;
     }
     for (let i = 0; i < args1.length; ++i) {
-      if (!dart._isSubtype(args2[i], args1[i], !covariant)) {
+      if (!dart._isSubtype(args2[i], args1[i], !isCovariant)) {
         return null;
       }
     }
     let optionals1 = ft1.optionals;
     let optionals2 = ft2.optionals;
     if (args1.length + optionals1.length < args2.length + optionals2.length) {
-      return covariant ? false : null;
+      return isCovariant ? false : null;
     }
     let j = 0;
     for (let i = args1.length; i < args2.length; ++i, ++j) {
-      if (!dart._isSubtype(args2[i], optionals1[j], !covariant)) {
+      if (!dart._isSubtype(args2[i], optionals1[j], !isCovariant)) {
         return null;
       }
     }
     for (let i = 0; i < optionals2.length; ++i, ++j) {
-      if (!dart._isSubtype(optionals2[i], optionals1[j], !covariant)) {
+      if (!dart._isSubtype(optionals2[i], optionals1[j], !isCovariant)) {
         return null;
       }
     }
@@ -1558,15 +1699,17 @@
       let n1 = named1[name];
       let n2 = named2[name];
       if (n1 === void 0) {
-        return covariant ? false : null;
+        return isCovariant ? false : null;
       }
-      if (!dart._isSubtype(n2, n1, !covariant)) {
+      if (!dart._isSubtype(n2, n1, !isCovariant)) {
         return null;
       }
     }
     if (ret2 === dart.void) return true;
-    if (ret1 === dart.void) return ret2 === dart.dynamic;
-    if (!dart._isSubtype(ret1, ret2, covariant)) return null;
+    if (ret1 === dart.void) {
+      return ret2 === dart.dynamic || ret2 === async.FutureOr;
+    }
+    if (!dart._isSubtype(ret1, ret2, isCovariant)) return null;
     return true;
   };
   dart._subtypeMemo = function(f) {
@@ -1589,9 +1732,12 @@
     return type == dart.bottom;
   };
   dart._isTop = function(type) {
+    if (dart.getGenericClass(type) === dart.getGenericClass(async.FutureOr)) {
+      return dart._isTop(dart.getGenericArgs(type)[0]);
+    }
     return type == core.Object || type == dart.dynamic;
   };
-  dart._isSubtype = function(t1, t2, covariant) {
+  dart._isSubtype = function(t1, t2, isCovariant) {
     if (t1 === t2) return true;
     if (dart._isTop(t2) || dart._isBottom(t1)) {
       return true;
@@ -1602,20 +1748,20 @@
       return false;
     }
     if (!(t1 instanceof dart.AbstractFunctionType) && !(t2 instanceof dart.AbstractFunctionType)) {
-      let result = dart.isClassSubType(t1, t2, covariant);
+      let result = dart.isClassSubType(t1, t2, isCovariant);
       if (result === true || result === null) return result;
     }
     t1 = dart.getImplicitFunctionType(t1);
     if (!t1) return false;
     if (dart.isFunctionType(t1) && dart.isFunctionType(t2)) {
-      return dart.isFunctionSubtype(t1, t2, covariant);
+      return dart.isFunctionSubtype(t1, t2, isCovariant);
     }
     if (t1 instanceof dart.LazyJSType && t2 instanceof dart.LazyJSType) {
-      return dart.isLazyJSSubtype(t1, t2, covariant);
+      return dart.isLazyJSSubtype(t1, t2, isCovariant);
     }
     return false;
   };
-  dart.isClassSubType = function(t1, t2, covariant) {
+  dart.isClassSubType = function(t1, t2, isCovariant) {
     if (t1 == t2) return true;
     if (t1 == core.Object) return false;
     if (t1 == null) return t2 == core.Object || t2 == dart.dynamic;
@@ -1633,16 +1779,25 @@
       }
       dart.assert(length == typeArguments2.length);
       for (let i = 0; i < length; ++i) {
-        let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], covariant);
+        let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], isCovariant);
         if (!result) {
           return result;
         }
       }
       return true;
     }
+    if (raw1 === dart.getGenericClass(async.FutureOr)) {
+      let t1TypeArg = dart.getGenericArgs(t1)[0];
+      let t1Future = dart.getGenericClass(async.Future)(t1TypeArg);
+      return dart.isSubtype(t1Future, t2) && dart.isSubtype(t1TypeArg, t2);
+    } else if (raw2 === dart.getGenericClass(async.FutureOr)) {
+      let t2TypeArg = dart.getGenericArgs(t2)[0];
+      let t2Future = dart.getGenericClass(async.Future)(t2TypeArg);
+      return dart.isSubtype(t1, t2Future) || dart.isSubtype(t1, t2TypeArg);
+    }
     let indefinite = false;
     function definitive(t1, t2) {
-      let result = dart.isClassSubType(t1, t2, covariant);
+      let result = dart.isClassSubType(t1, t2, isCovariant);
       if (result == null) {
         indefinite = true;
         return false;
@@ -1751,7 +1906,7 @@
       }
       return future.then(dart.dynamic)(onValue, {onError: onError});
     }
-    return dart.getGenericClass(async.Future)(T).new(function() {
+    return dart.getGenericClass(async.Future)(T).microtask(function() {
       iter = gen.apply(null, args)[Symbol.iterator]();
       return onValue();
     });
@@ -1763,18 +1918,32 @@
     let f = dart._canonicalMember(obj, field);
     dart._trackCall(obj);
     if (f != null) {
-      if (dart.test(dart.hasMethod(obj, f))) return dart.bind(obj, f, void 0);
-      return obj[f];
+      let type = dart.getType(obj);
+      if (dart.test(dart.hasField(type, f)) || dart.test(dart.hasGetter(type, f))) return obj[f];
+      if (dart.test(dart.hasMethod(type, f))) return dart.bind(obj, f, void 0);
     }
-    return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [], {isGetter: true}));
+    return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [], {isGetter: true}));
   };
   dart.dput = function(obj, field, value) {
     let f = dart._canonicalMember(obj, field);
     dart._trackCall(obj);
     if (f != null) {
-      return obj[f] = value;
+      let objType = dart.getType(obj);
+      let setterType = dart.getSetterType(objType, f);
+      if (setterType != void 0) {
+        if (dart.test(dart.instanceOfOrNull(value, setterType.args[0]))) {
+          return obj[f] = value;
+        }
+      } else {
+        let fieldType = dart.getFieldType(objType, f);
+        if (fieldType != void 0) {
+          if (dart.test(dart.instanceOfOrNull(value, fieldType))) {
+            return obj[f] = value;
+          }
+        }
+      }
     }
-    return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [value], {isSetter: true}));
+    return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [value], {isSetter: true}));
   };
   dart._checkApply = function(type, actuals) {
     if (actuals.length < type.args.length) return false;
@@ -1805,8 +1974,36 @@
     }
     return true;
   };
+  dart._toSymbolName = function(symbol) {
+    let str = symbol.toString();
+    return str.substring(7, str.length - 1);
+  };
+  dart._toDisplayName = function(name) {
+    if (name[0] === '_') {
+      switch (name) {
+        case '_get':
+        {
+          return '[]';
+        }
+        case '_set':
+        {
+          return '[]=';
+        }
+        case '_negate':
+        {
+          return 'unary-';
+        }
+        case '_constructor':
+        case '_prototype':
+        {
+          return name.substring(1);
+        }
+      }
+    }
+    return name;
+  };
   dart._dartSymbol = function(name) {
-    return dart.const(core.Symbol.new(name.toString()));
+    return core.Symbol._check(typeof name === "symbol" ? dart.const(new _internal.Symbol.es6(dart._toSymbolName(name), name)) : dart.const(core.Symbol.new(dart._toDisplayName(name))));
   };
   dart.extractNamedArgs = function(args) {
     if (args.length > 0) {
@@ -1825,7 +2022,7 @@
     }
     if (!(f instanceof Function)) {
       if (f != null) {
-        ftype = dart.getMethodType(f, 'call');
+        ftype = dart.getMethodType(dart.getType(f), 'call');
         f = f.call;
       }
       if (!(f instanceof Function)) {
@@ -1930,16 +2127,17 @@
       }
     }
     let actualTypeName = dart.typeName(actual);
-    let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(core.String._check(actualTypeName), src), VoidTo_MethodStats()));
+    let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(actualTypeName, src), VoidTo_MethodStats()));
     o.count = dart.notNull(o.count) + 1;
   };
   dart._callMethod = function(obj, name, typeArgs, args, displayName) {
     let symbol = dart._canonicalMember(obj, name);
     if (symbol == null) {
-      return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(displayName), core.List._check(args), {isMethod: true}));
+      return dart.noSuchMethod(obj, new dart.InvocationImpl(displayName, core.List._check(args), {isMethod: true}));
     }
     let f = obj != null ? obj[symbol] : null;
-    let ftype = dart.getMethodType(obj, symbol);
+    let type = dart.getType(obj);
+    let ftype = dart.getMethodType(type, symbol);
     return dart._checkAndCall(f, ftype, obj, typeArgs, args, displayName);
   };
   dart.dsend = function(obj, method, ...args) {
@@ -2330,7 +2528,56 @@
   dart.copyProperties = function(to, from) {
     return dart.copyTheseProperties(to, from, dart.getOwnNamesAndSymbols(from));
   };
-  dart.global = typeof window == "undefined" ? global : window;
+  dart.global = (function() {
+    if (typeof NodeList !== "undefined") {
+      NodeList.prototype.get = function(i) {
+        return this[i];
+      };
+      NamedNodeMap.prototype.get = function(i) {
+        return this[i];
+      };
+      DOMTokenList.prototype.get = function(i) {
+        return this[i];
+      };
+      HTMLCollection.prototype.get = function(i) {
+        return this[i];
+      };
+      if (typeof PannerNode == "undefined") {
+        let audioContext;
+        if (typeof AudioContext == "undefined" && typeof webkitAudioContext != "undefined") {
+          audioContext = new webkitAudioContext();
+        } else {
+          audioContext = new AudioContext();
+          window.StereoPannerNode = audioContext.createStereoPanner().constructor;
+        }
+        window.PannerNode = audioContext.createPanner().constructor;
+      }
+      if (typeof AudioSourceNode == "undefined") {
+        window.AudioSourceNode = MediaElementAudioSourceNode.__proto__;
+      }
+      if (typeof FontFaceSet == "undefined") {
+        window.FontFaceSet = document.fonts.__proto__.constructor;
+      }
+      if (typeof MemoryInfo == "undefined") {
+        if (typeof window.performance.memory != "undefined") {
+          window.MemoryInfo = window.performance.memory.constructor;
+        }
+      }
+      if (typeof Geolocation == "undefined") {
+        navigator.geolocation.constructor;
+      }
+      if (typeof Animation == "undefined") {
+        let d = document.createElement('div');
+        if (typeof d.animate != "undefined") {
+          window.Animation = d.animate(d).constructor;
+        }
+      }
+      if (typeof SourceBufferList == "undefined") {
+        window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
+      }
+    }
+    return typeof window == "undefined" ? global : window;
+  })();
   dart.JsSymbol = Symbol;
   dart._mixins = Symbol("mixins");
   dart.implements = Symbol("implements");
@@ -2482,196 +2729,186 @@
       this[_wrappedType] = wrappedType;
     }
     toString() {
-      return core.String._check(dart.typeName(this[_wrappedType]));
+      return dart.typeName(this[_wrappedType]);
     }
   };
   dart.setSignature(dart.WrappedType, {
     constructors: () => ({new: dart.definiteFunctionType(dart.WrappedType, [dart.dynamic])}),
     fields: () => ({[_wrappedType]: dart.dynamic})
   });
+  const _stringValue = Symbol('_stringValue');
   dart.AbstractFunctionType = class AbstractFunctionType extends dart.TypeRep {
-    constructor() {
-      super();
-      this._stringValue = null;
+    new() {
+      this[_stringValue] = null;
+      super.new();
     }
     toString() {
       return this.name;
     }
     get name() {
-      if (this._stringValue) return this._stringValue;
+      if (this[_stringValue] != null) return this[_stringValue];
       let buffer = '(';
       for (let i = 0; i < this.args.length; ++i) {
         if (i > 0) {
-          buffer += ', ';
+          buffer = dart.notNull(buffer) + ', ';
         }
-        buffer += dart.typeName(this.args[i]);
+        buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.args[i]));
       }
       if (this.optionals.length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '[';
+        if (this.args.length > 0) {
+          buffer = dart.notNull(buffer) + ', ';
+        }
+        buffer = dart.notNull(buffer) + '[';
         for (let i = 0; i < this.optionals.length; ++i) {
           if (i > 0) {
-            buffer += ', ';
+            buffer = dart.notNull(buffer) + ', ';
           }
-          buffer += dart.typeName(this.optionals[i]);
+          buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.optionals[i]));
         }
-        buffer += ']';
+        buffer = dart.notNull(buffer) + ']';
       } else if (Object.keys(this.named).length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '{';
-        let names = dart.getOwnPropertyNames(this.named).sort();
+        if (this.args.length > 0) {
+          buffer = dart.notNull(buffer) + ', ';
+        }
+        buffer = dart.notNull(buffer) + '{';
+        let names = dart.getOwnPropertyNames(this.named);
+        names.sort();
         for (let i = 0; i < names.length; ++i) {
           if (i > 0) {
-            buffer += ', ';
+            buffer = dart.notNull(buffer) + ', ';
           }
-          buffer += names[i] + ': ' + dart.typeName(this.named[names[i]]);
+          let typeNameString = dart.typeName(this.named[names[i]]);
+          buffer = dart.notNull(buffer) + dart.str`${names[i]}: ${typeNameString}`;
         }
-        buffer += '}';
+        buffer = dart.notNull(buffer) + '}';
       }
-      buffer += ') -> ' + dart.typeName(this.returnType);
-      this._stringValue = buffer;
+      let returnTypeName = dart.typeName(this.returnType);
+      buffer = dart.notNull(buffer) + dart.str`) -> ${returnTypeName}`;
+      this[_stringValue] = buffer;
       return buffer;
     }
   };
+  dart.setSignature(dart.AbstractFunctionType, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.AbstractFunctionType, [])}),
+    fields: () => ({[_stringValue]: core.String})
+  });
   dart._fnTypeNamedArgMap = new Map();
   dart._fnTypeArrayArgMap = new Map();
   dart._fnTypeTypeMap = new Map();
   dart._fnTypeSmallMap = [new Map(), new Map(), new Map()];
+  const _process = Symbol('_process');
   dart.FunctionType = class FunctionType extends dart.AbstractFunctionType {
-    static _memoizeArray(map, arr, create) {
-      let len = arr.length;
-      map = FunctionType._lookupNonTerminal(map, len);
-      for (var i = 0; i < len - 1; ++i) {
-        map = FunctionType._lookupNonTerminal(map, arr[i]);
-      }
-      let result = map.get(arr[len - 1]);
-      if (result !== void 0) return result;
-      map.set(arr[len - 1], result = create());
-      return result;
-    }
-    static _normalizeParameter(a) {
-      if (a instanceof Array) {
-        let result = [];
-        result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
-        result.push(a.slice(1));
-        return result;
-      }
-      return a == dart.dynamic ? dart.bottom : a;
-    }
-    static _canonicalizeArray(definite, array, map) {
-      let arr = definite ? array : array.map(FunctionType._normalizeParameter);
-      return FunctionType._memoizeArray(map, arr, () => arr);
-    }
-    static _canonicalizeNamed(definite, named, map) {
-      let key = [];
-      let names = dart.getOwnPropertyNames(named);
-      let r = {};
-      for (var i = 0; i < names.length; ++i) {
-        let name = names[i];
-        let type = named[name];
-        if (!definite) r[name] = type = FunctionType._normalizeParameter(type);
-        key.push(name);
-        key.push(type);
-      }
-      if (!definite) named = r;
-      return FunctionType._memoizeArray(map, key, () => named);
-    }
-    static _lookupNonTerminal(map, key) {
-      let result = map.get(key);
-      if (result !== void 0) return result;
-      map.set(key, result = new Map());
-      return result;
-    }
-    static _createSmall(count, definite, returnType, required) {
-      let map = dart._fnTypeSmallMap[count];
-      let args = definite ? required : required.map(FunctionType._normalizeParameter);
-      for (var i = 0; i < count; ++i) {
-        map = FunctionType._lookupNonTerminal(map, args[i]);
-      }
-      let result = map.get(returnType);
-      if (result !== void 0) return result;
-      result = new FunctionType(returnType, args, [], {});
-      map.set(returnType, result);
-      return result;
-    }
     static create(definite, returnType, args, extra) {
       if (extra === void 0 && args.length < 3) {
-        return FunctionType._createSmall(args.length, definite, returnType, args);
+        return dart._createSmall(args.length, definite, returnType, args);
       }
-      args = FunctionType._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
-      let keys;
-      let create;
+      args = dart._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
+      let keys = null;
+      let create = null;
       if (extra === void 0) {
         keys = [returnType, args];
-        create = () => new FunctionType(returnType, args, [], {});
+        create = dart.fn(() => new dart.FunctionType(returnType, args, [], {}), VoidToFunctionType());
       } else if (extra instanceof Array) {
-        let optionals = FunctionType._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
+        let optionals = dart._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
         keys = [returnType, args, optionals];
-        create = () => new FunctionType(returnType, args, optionals, {});
+        create = dart.fn(() => new dart.FunctionType(returnType, args, optionals, {}), VoidToFunctionType());
       } else {
-        let named = FunctionType._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
+        let named = dart._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
         keys = [returnType, args, named];
-        create = () => new FunctionType(returnType, args, [], named);
+        create = dart.fn(() => new dart.FunctionType(returnType, args, [], named), VoidToFunctionType());
       }
-      return FunctionType._memoizeArray(dart._fnTypeTypeMap, keys, create);
+      return dart._memoizeArray(dart._fnTypeTypeMap, keys, create);
     }
-    constructor(returnType, args, optionals, named) {
-      super();
+    [_process](array, metadata) {
+      let result = [];
+      for (let i = 0; i < array.length; ++i) {
+        let arg = array[i];
+        if (arg instanceof Array) {
+          dart.dsend(metadata, 'add', arg.slice(1));
+          result[dartx.add](arg[0]);
+        } else {
+          metadata.push([]);
+          result.push(arg);
+        }
+      }
+      return result;
+    }
+    new(returnType, args, optionals, named) {
       this.returnType = returnType;
       this.args = args;
       this.optionals = optionals;
       this.named = named;
+      this.metadata = null;
+      super.new();
       this.metadata = [];
-      function process(array, metadata) {
-        var result = [];
-        for (var i = 0; i < array.length; ++i) {
-          var arg = array[i];
-          if (arg instanceof Array) {
-            metadata.push(arg.slice(1));
-            result.push(arg[0]);
-          } else {
-            metadata.push([]);
-            result.push(arg);
-          }
-        }
-        return result;
-      }
-      this.args = process(this.args, this.metadata);
-      this.optionals = process(this.optionals, this.metadata);
+      this.args = this[_process](this.args, this.metadata);
+      this.optionals = this[_process](this.optionals, this.metadata);
     }
   };
+  dart.setSignature(dart.FunctionType, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.FunctionType, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+    fields: () => ({
+      returnType: dart.dynamic,
+      args: dart.dynamic,
+      optionals: dart.dynamic,
+      named: dart.dynamic,
+      metadata: dart.dynamic
+    }),
+    methods: () => ({[_process]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])}),
+    statics: () => ({create: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+    names: ['create']
+  });
+  const _name = Symbol('_name');
+  const _closure = Symbol('_closure');
+  const _functionType = Symbol('_functionType');
   dart.Typedef = class Typedef extends dart.AbstractFunctionType {
-    constructor(name, closure) {
-      super();
-      this._name = name;
-      this._closure = closure;
-      this._functionType = null;
+    new(name, closure) {
+      this[_name] = name;
+      this[_closure] = closure;
+      this[_functionType] = null;
+      super.new();
     }
     get name() {
-      return this._name;
+      return core.String._check(this[_name]);
     }
     get functionType() {
-      if (!this._functionType) {
-        this._functionType = this._closure();
+      if (this[_functionType] == null) {
+        this[_functionType] = this[_closure]();
       }
-      return this._functionType;
+      return this[_functionType];
     }
     get returnType() {
       return this.functionType.returnType;
     }
     get args() {
-      return this.functionType.args;
+      return core.List._check(this.functionType.args);
     }
     get optionals() {
-      return this.functionType.optionals;
+      return core.List._check(this.functionType.optionals);
     }
     get named() {
       return this.functionType.named;
     }
     get metadata() {
-      return this.functionType.metadata;
+      return core.List._check(this.functionType.metadata);
     }
   };
+  dart.setSignature(dart.Typedef, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.Typedef, [dart.dynamic, dart.dynamic])}),
+    fields: () => ({
+      [_name]: dart.dynamic,
+      [_closure]: dart.dynamic,
+      [_functionType]: dart.AbstractFunctionType
+    }),
+    getters: () => ({
+      functionType: dart.definiteFunctionType(dart.AbstractFunctionType, []),
+      returnType: dart.definiteFunctionType(dart.dynamic, []),
+      args: dart.definiteFunctionType(core.List, []),
+      optionals: dart.definiteFunctionType(core.List, []),
+      named: dart.definiteFunctionType(dart.dynamic, []),
+      metadata: dart.definiteFunctionType(core.List, [])
+    })
+  });
   dart._typeFormalCount = Symbol("_typeFormalCount");
   dart.isSubtype = dart._subtypeMemo((t1, t2) => t1 === t2 || dart._isSubtype(t1, t2, true));
   dart._trapRuntimeErrors = true;
@@ -2807,7 +3044,7 @@
     }
   };
   dart.setSignature(dart.InvocationImpl, {
-    constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [core.String, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
+    constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [dart.dynamic, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
     fields: () => ({
       memberName: core.Symbol,
       positionalArguments: core.List,
@@ -2951,8 +3188,8 @@
   dart.lazyFn(_debugger.getObjectTypeName, () => dynamicToString());
   _debugger.getTypeName = function(type) {
     let name = dart.typeName(type);
-    if (dart.equals(name, 'JSArray<dynamic>') || dart.equals(name, 'JSObject<Array>')) return 'List<dynamic>';
-    return core.String._check(name);
+    if (name == 'JSArray<dynamic>' || name == 'JSObject<Array>') return 'List<dynamic>';
+    return name;
   };
   dart.lazyFn(_debugger.getTypeName, () => TypeToString());
   _debugger._getType = function(object) {
@@ -3500,7 +3737,7 @@
       return true;
     }
     preview(object) {
-      return core.String._check(dart.typeName(dart.getReifiedType(object)));
+      return dart.typeName(dart.getReifiedType(object));
     }
     children(object) {
       return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'signature', value: this.preview(object)}), new _debugger.NameValuePair({name: 'JavaScript Function', value: object, config: _debugger.JsonMLConfig.skipDart})]);
@@ -7211,30 +7448,8 @@
     ListIterable[dart.implements] = () => [_internal.EfficientLength];
     dart.setSignature(ListIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.ListIterable$(E), [])}),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
-      methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        every: dart.definiteFunctionType(core.bool, [ETobool()]),
-        any: dart.definiteFunctionType(core.bool, [ETobool()]),
-        firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        singleWhere: dart.definiteFunctionType(E, [ETobool()]),
-        where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-        reduce: dart.definiteFunctionType(E, [dynamicAndEToE()]),
-        fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+      methods: () => ({reduce: dart.definiteFunctionType(E, [dynamicAndEToE()])})
     });
     dart.defineExtensionMembers(ListIterable, [
       'forEach',
@@ -7360,12 +7575,6 @@
       getters: () => ({
         [_endIndex]: dart.definiteFunctionType(core.int, []),
         [_startIndex]: dart.definiteFunctionType(core.int, [])
-      }),
-      methods: () => ({
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool})
       })
     });
     dart.defineExtensionMembers(SubListIterable, [
@@ -7480,13 +7689,7 @@
         [_iterable$]: IterableOfS(),
         [_f]: _TransformationOfS$T()
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(T), []),
-        first: dart.definiteFunctionType(T, []),
-        last: dart.definiteFunctionType(T, []),
-        single: dart.definiteFunctionType(T, [])
-      }),
-      methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(T), [])})
     });
     dart.defineExtensionMembers(MappedIterable, [
       'elementAt',
@@ -7579,8 +7782,7 @@
       fields: () => ({
         [_source]: IterableOfS(),
         [_f]: _TransformationOfS$T()
-      }),
-      methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+      })
     });
     dart.defineExtensionMembers(MappedListIterable, ['elementAt', 'length']);
     return MappedListIterable;
@@ -7929,8 +8131,7 @@
         [_iterable$]: IterableOfE(),
         [_skipCount]: core.int
       }),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({skip: dart.definiteFunctionType(core.Iterable$(E), [core.int])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(SkipIterable, ['skip', 'iterator']);
     return SkipIterable;
@@ -8156,31 +8357,8 @@
     EmptyIterable[dart.implements] = () => [_internal.EfficientLength];
     dart.setSignature(EmptyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.EmptyIterable$(E), [])}),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
-      methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        every: dart.definiteFunctionType(core.bool, [ETobool()]),
-        any: dart.definiteFunctionType(core.bool, [ETobool()]),
-        firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-        reduce: dart.definiteFunctionType(E, [EAndEToE()]),
-        fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+      methods: () => ({singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()})})
     });
     dart.defineExtensionMembers(EmptyIterable, [
       'forEach',
@@ -8379,8 +8557,7 @@
   dart.addSimpleTypeTests(_internal._ListIndicesIterable);
   dart.setSignature(_internal._ListIndicesIterable, {
     constructors: () => ({new: dart.definiteFunctionType(_internal._ListIndicesIterable, [core.List])}),
-    fields: () => ({[_backedList]: core.List}),
-    methods: () => ({elementAt: dart.definiteFunctionType(core.int, [core.int])})
+    fields: () => ({[_backedList]: core.List})
   });
   dart.defineExtensionMembers(_internal._ListIndicesIterable, ['elementAt', 'length']);
   const _values = Symbol('_values');
@@ -8509,8 +8686,7 @@
     }
     dart.setSignature(ReversedListIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.ReversedListIterable$(E), [IterableOfE()])}),
-      fields: () => ({[_source]: IterableOfE()}),
-      methods: () => ({elementAt: dart.definiteFunctionType(E, [core.int])})
+      fields: () => ({[_source]: IterableOfE()})
     });
     dart.defineExtensionMembers(ReversedListIterable, ['elementAt', 'length']);
     return ReversedListIterable;
@@ -8891,41 +9067,41 @@
     names: ['sort', 'sortRange', '_doSort', '_insertionSort', '_dualPivotQuicksort']
   });
   _internal.Sort._INSERTION_SORT_THRESHOLD = 32;
-  const _name = Symbol('_name');
+  const _name$ = Symbol('_name');
   const _nativeSymbol = Symbol('_nativeSymbol');
   _internal.Symbol = class Symbol extends core.Object {
     new(name) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = null;
     }
     es6(name, nativeSymbol) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = nativeSymbol;
     }
     unvalidated(name) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = null;
     }
     validated(name) {
-      this[_name] = _internal.Symbol.validatePublicSymbol(name);
+      this[_name$] = _internal.Symbol.validatePublicSymbol(name);
       this[_nativeSymbol] = null;
     }
     ['=='](other) {
-      return _internal.Symbol.is(other) && this[_name] == other[_name] && dart.equals(this[_nativeSymbol], other[_nativeSymbol]);
+      return _internal.Symbol.is(other) && this[_name$] == other[_name$] && dart.equals(this[_nativeSymbol], other[_nativeSymbol]);
     }
     get hashCode() {
       let hash = this._hashCode;
       if (hash != null) return hash;
       let arbitraryPrime = 664597;
-      hash = 536870911 & arbitraryPrime * dart.notNull(dart.hashCode(this[_name]));
+      hash = 536870911 & arbitraryPrime * dart.notNull(dart.hashCode(this[_name$]));
       this._hashCode = hash;
       return hash;
     }
     toString() {
-      return dart.str`Symbol("${this[_name]}")`;
+      return dart.str`Symbol("${this[_name$]}")`;
     }
     static getName(symbol) {
-      return symbol[_name];
+      return symbol[_name$];
     }
     static getNativeSymbol(symbol) {
       return symbol[_nativeSymbol];
@@ -8953,7 +9129,7 @@
       validated: dart.definiteFunctionType(_internal.Symbol, [core.String])
     }),
     fields: () => ({
-      [_name]: core.String,
+      [_name$]: core.String,
       [_nativeSymbol]: dart.dynamic
     }),
     methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])}),
@@ -9678,7 +9854,7 @@
       let replyPort = dart.dindex(msg, 'replyPort');
       _isolate_helper.IsolateNatives.spawn(core.String._check(dart.dindex(msg, 'functionName')), core.String._check(dart.dindex(msg, 'uri')), ListOfString()._check(dart.dindex(msg, 'args')), dart.dindex(msg, 'msg'), false, core.bool._check(dart.dindex(msg, 'isSpawnUri')), core.bool._check(dart.dindex(msg, 'startPaused'))).then(dart.dynamic)(dart.fn(msg => {
         dart.dsend(replyPort, 'send', msg);
-      }, ListTodynamic()), {onError: dart.fn(errorMessage => {
+      }, ListToFutureOr()), {onError: dart.fn(errorMessage => {
           dart.dsend(replyPort, 'send', JSArrayOfString().of([_isolate_helper._SPAWN_FAILED_SIGNAL, errorMessage]));
         }, StringTodynamic())});
     }
@@ -9737,7 +9913,7 @@
           dart.assert(dart.equals(dart.dindex(msg, 0), _isolate_helper._SPAWN_FAILED_SIGNAL));
           completer.completeError(dart.dindex(msg, 1));
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
       let signalReply = port.sendPort;
       if (dart.test(_isolate_helper._globalState.useWorkers) && !dart.test(isLight)) {
         _isolate_helper.IsolateNatives._startWorker(functionName, uri, args, message, isSpawnUri, startPaused, signalReply, dart.fn(message => completer.completeError(message), StringTovoid$()));
@@ -10076,6 +10252,7 @@
     let IterableOfT = () => (IterableOfT = dart.constFn(core.Iterable$(T)))();
     let intToT = () => (intToT = dart.constFn(dart.functionType(T, [core.int])))();
     let EventSinkOfTToEventSink = () => (EventSinkOfTToEventSink = dart.constFn(dart.functionType(async.EventSink, [EventSinkOfT()])))();
+    let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
     let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
     let VoidTo_IterablePendingEventsOfT = () => (VoidTo_IterablePendingEventsOfT = dart.constFn(dart.definiteFunctionType(_IterablePendingEventsOfT(), [])))();
     let TTovoid$ = () => (TTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [T])))();
@@ -10093,7 +10270,7 @@
         future.then(dart.dynamic)(dart.fn(value => {
           controller[_add$](value);
           controller[_closeUnchecked]();
-        }, TTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+        }, TToFutureOr()), {onError: dart.fn((error, stackTrace) => {
             controller[_addError](error, core.StackTrace._check(stackTrace));
             controller[_closeUnchecked]();
           }, dynamicAnddynamicTodynamic$())});
@@ -10215,7 +10392,7 @@
 
               if (async.Future.is(newValue)) {
                 subscription.pause();
-                newValue.then(dart.dynamic)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
+                newValue.then(dart.void)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
               } else {
                 controller.add(E.as(newValue));
               }
@@ -12677,12 +12854,6 @@
         return new Map();
       }
     }
-    dart.setSignature(Es6LinkedHashMap, {
-      methods: () => ({
-        [_getTableCell]: dart.definiteFunctionType(_js_helper.LinkedHashMapCell$(K, V), [dart.dynamic, dart.dynamic]),
-        [_getTableBucket]: dart.definiteFunctionType(core.List$(_js_helper.LinkedHashMapCell$(K, V)), [dart.dynamic, dart.dynamic])
-      })
-    });
     return Es6LinkedHashMap;
   });
   _js_helper.Es6LinkedHashMap = Es6LinkedHashMap();
@@ -12747,8 +12918,7 @@
     dart.setSignature(LinkedHashMapKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_js_helper.LinkedHashMapKeyIterable$(E), [JsLinkedHashMapOfE$dynamic()])}),
       fields: () => ({[_map]: JsLinkedHashMapOfE$dynamic()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(LinkedHashMapKeyIterable, [
       'contains',
@@ -13196,10 +13366,7 @@
       [_pattern]: core.String,
       [_index$0]: core.int
     }),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(core.Match), []),
-      first: dart.definiteFunctionType(core.Match, [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(core.Match), [])})
   });
   dart.defineExtensionMembers(_js_helper._StringAllMatchesIterable, ['iterator', 'first']);
   _js_helper._StringAllMatchesIterator = class _StringAllMatchesIterator extends core.Object {
@@ -13514,7 +13681,31 @@
     if (privateSymbol != null) {
       return privateSymbol;
     }
-    return _js_mirrors.getName(symbol);
+    let name = _js_mirrors.getName(symbol);
+    switch (name) {
+      case '[]':
+      {
+        name = '_get';
+        break;
+      }
+      case '[]=':
+      {
+        name = '_set';
+        break;
+      }
+      case 'unary-':
+      {
+        name = '_negate';
+        break;
+      }
+      case 'constructor':
+      case 'prototype':
+      {
+        name = dart.str`_${name}`;
+        break;
+      }
+    }
+    return name;
   };
   dart.lazyFn(_js_mirrors._getMember, () => SymbolTodynamic());
   _js_mirrors._getNameForESSymbol = function(member) {
@@ -14058,21 +14249,21 @@
     })
   });
   const _symbol = Symbol('_symbol');
-  const _name$ = Symbol('_name');
+  const _name$0 = Symbol('_name');
   _js_mirrors.JsVariableMirror = class JsVariableMirror extends _js_mirrors.JsMirror {
     get simpleName() {
       return this[_symbol];
     }
     _(symbol, t, annotations) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.type = _js_mirrors.reflectType(t);
       this.metadata = ListOfInstanceMirror().unmodifiable(annotations[dartx.map](mirrors.InstanceMirror)(dart.fn(a => _js_mirrors.reflect(a), dynamicToInstanceMirror())));
       this.isStatic = false;
       this.isFinal = false;
     }
     toString() {
-      return dart.str`VariableMirror on '${this[_name$]}'`;
+      return dart.str`VariableMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14099,7 +14290,7 @@
     constructors: () => ({_: dart.definiteFunctionType(_js_mirrors.JsVariableMirror, [core.Symbol, core.Type, core.List])}),
     fields: () => ({
       [_symbol]: core.Symbol,
-      [_name$]: core.String,
+      [_name$0]: core.String,
       type: mirrors.TypeMirror,
       metadata: ListOfInstanceMirror(),
       isStatic: core.bool,
@@ -14112,7 +14303,7 @@
       super._(member, t, annotations);
     }
     toString() {
-      return dart.str`ParameterMirror on '${this[_name$]}'`;
+      return dart.str`ParameterMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14157,17 +14348,17 @@
   let const$4;
   _js_mirrors.JsMethodMirror = class JsMethodMirror extends _js_mirrors.JsMirror {
     get isSetter() {
-      return this[_name$][dartx.endsWith]('=');
+      return this[_name$0][dartx.endsWith]('=');
     }
     get isPrivate() {
-      return this[_name$][dartx.startsWith]('_');
+      return this[_name$0][dartx.startsWith]('_');
     }
     get simpleName() {
       return this[_symbol];
     }
     _constructor(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = true;
       this.isStatic = false;
       this[_params] = null;
@@ -14177,7 +14368,7 @@
     }
     _instanceMethod(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = false;
       this.isStatic = false;
       this[_params] = null;
@@ -14187,7 +14378,7 @@
     }
     _staticMethod(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = false;
       this.isStatic = true;
       this[_params] = null;
@@ -14237,7 +14428,7 @@
       this[_params] = ListOfParameterMirror().unmodifiable(params);
     }
     toString() {
-      return dart.str`MethodMirror on '${this[_name$]}'`;
+      return dart.str`MethodMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14297,7 +14488,7 @@
     }),
     fields: () => ({
       [_symbol]: core.Symbol,
-      [_name$]: core.String,
+      [_name$0]: core.String,
       [_params]: ListOfParameterMirror(),
       [_metadata$]: ListOfInstanceMirror(),
       isConstructor: core.bool,
@@ -15144,8 +15335,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Float32x4, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Float32x4), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeFloat32x4List, [
@@ -15777,8 +15967,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Int32x4, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Int32x4), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeInt32x4List, [
@@ -15894,8 +16083,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Float64x2, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Float64x2), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeFloat64x2List, [
@@ -16260,8 +16448,7 @@
     getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
     methods: () => ({
       _get: dart.definiteFunctionType(core.double, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, core.num]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfdouble()], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, core.num])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfDouble, ['_get', '_set', 'setRange', 'length']);
@@ -16294,10 +16481,7 @@
   _native_typed_data.NativeTypedArrayOfInt[dart.implements] = () => [ListOfint()];
   dart.setSignature(_native_typed_data.NativeTypedArrayOfInt, {
     getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
-    methods: () => ({
-      _set: dart.definiteFunctionType(dart.void, [core.int, core.int]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfint()], [core.int])
-    })
+    methods: () => ({_set: dart.definiteFunctionType(dart.void, [core.int, core.int])})
   });
   dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfInt, ['_set', 'setRange', 'length']);
   dart.defineExtensionNames([
@@ -16341,7 +16525,6 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [ListOfdouble()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic, dart.dynamic]),
@@ -16391,7 +16574,6 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [ListOfdouble()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic, dart.dynamic]),
@@ -16446,10 +16628,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [_native_typed_data.NativeByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic, dart.dynamic]),
@@ -16504,10 +16683,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic, dart.dynamic]),
@@ -16562,10 +16738,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic, dart.dynamic]),
@@ -16620,10 +16793,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic, dart.dynamic]),
@@ -16678,10 +16848,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic, dart.dynamic]),
@@ -16743,10 +16910,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic, dart.dynamic]),
@@ -16809,10 +16973,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic, dart.dynamic]),
@@ -17626,10 +17787,7 @@
     dart.setSignature(_ControllerStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._ControllerStream$(T), [_StreamControllerLifecycleOfT()])}),
       fields: () => ({[_controller$]: _StreamControllerLifecycleOfT()}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        '==': dart.definiteFunctionType(core.bool, [core.Object])
-      })
+      methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])})
     });
     return _ControllerStream;
   });
@@ -17734,7 +17892,7 @@
       }
       onDone(handleDone) {
         if (handleDone == null) handleDone = async._nullDoneHandler;
-        this[_onDone] = this[_zone].registerCallback(dart.dynamic)(handleDone);
+        this[_onDone] = this[_zone].registerCallback(dart.void)(handleDone);
       }
       pause(resumeSignal) {
         if (resumeSignal === void 0) resumeSignal = null;
@@ -17887,7 +18045,7 @@
         dart.assert(!dart.test(this[_inCallback]));
         let wasInputPaused = this[_isInputPaused];
         this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-        this[_zone].runUnaryGuarded(dart.dynamic, T)(this[_onData], data);
+        this[_zone].runUnaryGuarded(dart.void, T)(this[_onData], data);
         this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
         this[_checkState](wasInputPaused);
       }
@@ -17928,7 +18086,7 @@
         const sendDone = (function() {
           if (!dart.test(this[_waitsForCancel])) return;
           this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_CANCELED | async._BufferingStreamSubscription._STATE_CLOSED | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-          this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+          this[_zone].runGuarded(dart.void)(this[_onDone]);
           this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
         }).bind(this);
         dart.fn(sendDone, VoidTovoid$());
@@ -18621,10 +18779,7 @@
       constructors: () => ({new: dart.definiteFunctionType(async._AsBroadcastStreamController$(T), [VoidTovoid(), VoidTovoid()])}),
       fields: () => ({[_pending]: _StreamImplEventsOfT()}),
       getters: () => ({[_hasPending]: dart.definiteFunctionType(core.bool, [])}),
-      methods: () => ({
-        [_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent]),
-        add: dart.definiteFunctionType(dart.void, [T])
-      })
+      methods: () => ({[_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent])})
     });
     return _AsBroadcastStreamController;
   });
@@ -18643,7 +18798,7 @@
       onDone(handleDone) {}
       pause(resumeSignal) {
         if (resumeSignal === void 0) resumeSignal = null;
-        if (resumeSignal != null) resumeSignal.then(dart.dynamic)(dart.bind(this, _resume));
+        if (resumeSignal != null) resumeSignal.then(dart.void)(dart.bind(this, _resume));
         this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1;
       }
       resume() {
@@ -18718,6 +18873,20 @@
     constructors: () => ({new: dart.definiteFunctionType(async.DeferredLoadException, [core.String])}),
     fields: () => ({[_s]: core.String})
   });
+  async.FutureOr$ = dart.generic(T => {
+    class FutureOr extends core.Object {
+      _() {
+        dart.throw(new core.UnsupportedError("FutureOr can't be instantiated"));
+      }
+    }
+    dart.addTypeTests(FutureOr);
+    dart.defineNamedConstructor(FutureOr, '_');
+    dart.setSignature(FutureOr, {
+      constructors: () => ({_: dart.definiteFunctionType(async.FutureOr$(T), [])})
+    });
+    return FutureOr;
+  });
+  async.FutureOr = FutureOr();
   const _completeWithValue = Symbol('_completeWithValue');
   let const$8;
   async.Future$ = dart.flattenFutures(dart.generic(T => {
@@ -18781,7 +18950,7 @@
         let result = new (_FutureOfT())();
         async.Timer.new(duration, dart.fn(() => {
           try {
-            result[_complete](computation == null ? null : computation());
+            result[_complete](dart.nullSafe(computation, _ => _()));
           } catch (e) {
             let s = dart.stackTrace(e);
             async._completeWithErrorCallback(result, e, s);
@@ -18823,31 +18992,43 @@
             }
           }
           dart.fn(handleError, dynamicAnddynamicTovoid$());
-          for (let future of futures) {
-            let pos = remaining++;
-            future.then(dart.dynamic)(dart.fn(value => {
-              remaining--;
-              if (values != null) {
-                values[dartx._set](pos, value);
-                if (remaining == 0) {
-                  result[_completeWithValue](values);
+          try {
+            for (let future of futures) {
+              let pos = remaining;
+              future.then(dart.dynamic)(dart.fn(value => {
+                remaining--;
+                if (values != null) {
+                  values[dartx._set](pos, value);
+                  if (remaining == 0) {
+                    result[_completeWithValue](values);
+                  }
+                } else {
+                  if (cleanUp != null && value != null) {
+                    async.Future.sync(dart.fn(() => {
+                      cleanUp(value);
+                    }, VoidTodynamic$()));
+                  }
+                  if (remaining == 0 && !dart.test(eagerError)) {
+                    result[_completeError](error, stackTrace);
+                  }
                 }
-              } else {
-                if (cleanUp != null && value != null) {
-                  async.Future.sync(dart.fn(() => {
-                    cleanUp(value);
-                  }, VoidTodynamic$()));
-                }
-                if (remaining == 0 && !dart.test(eagerError)) {
-                  result[_completeError](error, stackTrace);
-                }
-              }
-            }, dart.definiteFunctionType(dart.dynamic, [T])), {onError: handleError});
+              }, dart.definiteFunctionType(async.FutureOr, [T])), {onError: handleError});
+              remaining++;
+            }
+            if (remaining == 0) {
+              return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
+            }
+            values = core.List$(T).new(remaining);
+          } catch (e) {
+            let st = dart.stackTrace(e);
+            if (remaining == 0 || dart.test(eagerError)) {
+              return async.Future$(core.List$(T)).error(e, st);
+            } else {
+              error = e;
+              stackTrace = st;
+            }
           }
-          if (remaining == 0) {
-            return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
-          }
-          values = core.List$(T).new(remaining);
+
           return result;
         };
       }
@@ -18878,7 +19059,7 @@
         let nextIteration = null;
         nextIteration = async.Zone.current.bindUnaryCallback(dart.dynamic, core.bool)(dart.fn(keepGoing => {
           if (dart.test(keepGoing)) {
-            async.Future.sync(f).then(dart.dynamic)(dynamicTodynamic()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
+            async.Future.sync(f).then(dart.dynamic)(dynamicToFutureOr()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
           } else {
             doneSignal[_complete](null);
           }
@@ -19219,6 +19400,7 @@
   const _setChained = Symbol('_setChained');
   const _thenNoZoneRegistration = Symbol('_thenNoZoneRegistration');
   const _setPendingComplete = Symbol('_setPendingComplete');
+  const _clearPendingComplete = Symbol('_clearPendingComplete');
   const _error = Symbol('_error');
   const _chainSource = Symbol('_chainSource');
   const _setValue = Symbol('_setValue');
@@ -19234,7 +19416,7 @@
     let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
     let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))();
     let TTodynamic = () => (TTodynamic = dart.constFn(dart.functionType(dart.dynamic, [T])))();
-    let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
+    let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
     class _Future extends core.Object {
       new() {
         this[_zone] = async.Zone.current;
@@ -19283,7 +19465,7 @@
           let currentZone = async.Zone.current;
           let registered = null;
           if (!core.identical(currentZone, async._ROOT_ZONE)) {
-            f = currentZone.registerUnaryCallback(dart.dynamic, T)(f);
+            f = currentZone.registerUnaryCallback(async.FutureOr$(E), T)(f);
             if (onError != null) {
               onError = async._registerErrorHandler(T)(onError, currentZone);
             }
@@ -19323,6 +19505,10 @@
         dart.assert(this[_mayComplete]);
         this[_state] = async._Future._PENDING_COMPLETE;
       }
+      [_clearPendingComplete]() {
+        dart.assert(this[_isPendingComplete]);
+        this[_state] = async._Future._INCOMPLETE;
+      }
       get [_error]() {
         dart.assert(this[_hasError]);
         return async.AsyncError._check(this[_resultOrListeners]);
@@ -19423,8 +19609,9 @@
         try {
           source.then(dart.dynamic)(dart.fn(value => {
             dart.assert(target[_isPendingComplete]);
-            target[_completeWithValue](value);
-          }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+            target[_clearPendingComplete]();
+            target[_complete](value);
+          }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
               if (stackTrace === void 0) stackTrace = null;
               dart.assert(target[_isPendingComplete]);
               target[_completeError](error, core.StackTrace._check(stackTrace));
@@ -19674,7 +19861,7 @@
             timer.cancel();
             result[_completeWithValue](v);
           }
-        }, TTodynamic$()), {onError: dart.fn((e, s) => {
+        }, TToFutureOr()), {onError: dart.fn((e, s) => {
             if (dart.test(timer.isActive)) {
               timer.cancel();
               result[_completeError](e, core.StackTrace._check(s));
@@ -19710,12 +19897,13 @@
       }),
       methods: () => ({
         [_setChained]: dart.definiteFunctionType(dart.void, [async._Future]),
-        then: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic()], {onError: core.Function}]),
+        then: dart.definiteFunctionType(E => [async.Future$(E), [dart.functionType(async.FutureOr$(E), [T])], {onError: core.Function}]),
         [_thenNoZoneRegistration]: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic(), core.Function]]),
         catchError: dart.definiteFunctionType(async.Future$(T), [core.Function], {test: dynamicTobool()}),
         whenComplete: dart.definiteFunctionType(async.Future$(T), [VoidTodynamic()]),
         asStream: dart.definiteFunctionType(async.Stream$(T), []),
         [_setPendingComplete]: dart.definiteFunctionType(dart.void, []),
+        [_clearPendingComplete]: dart.definiteFunctionType(dart.void, []),
         [_setValue]: dart.definiteFunctionType(dart.void, [T]),
         [_setErrorObject]: dart.definiteFunctionType(dart.void, [async.AsyncError]),
         [_setError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace]),
@@ -19836,10 +20024,10 @@
     }
     let implementation = currentZone[_scheduleMicrotask];
     if (core.identical(async._ROOT_ZONE, implementation.zone) && dart.test(async._ROOT_ZONE.inSameErrorZone(currentZone))) {
-      async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.dynamic)(callback));
+      async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.void)(callback));
       return;
     }
-    async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+    async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
   };
   dart.fn(async.scheduleMicrotask, _AsyncCallbackTovoid());
   async._AsyncRun = class _AsyncRun extends core.Object {
@@ -19959,10 +20147,7 @@
     dart.setSignature(StreamView, {
       constructors: () => ({new: dart.definiteFunctionType(async.StreamView$(T), [StreamOfT()])}),
       fields: () => ({[_stream]: StreamOfT()}),
-      methods: () => ({
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-        listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-      })
+      methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
     });
     return StreamView;
   });
@@ -20667,8 +20852,7 @@
       fields: () => ({
         [_pending]: _EventGeneratorOfT(),
         [_isUsed]: core.bool
-      }),
-      methods: () => ({[_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool])})
+      })
     });
     return _GeneratedStreamImpl;
   });
@@ -21016,7 +21200,7 @@
         this[_state] = (dart.notNull(this[_state]) & ~async._DoneStreamSubscription._SCHEDULED) >>> 0;
         if (dart.test(this.isPaused)) return;
         this[_state] = (dart.notNull(this[_state]) | async._DoneStreamSubscription._DONE_SENT) >>> 0;
-        if (this[_onDone] != null) this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+        if (this[_onDone] != null) this[_zone].runGuarded(dart.void)(this[_onDone]);
       }
     }
     dart.addTypeTests(_DoneStreamSubscription);
@@ -21101,7 +21285,7 @@
       [_onCancel]() {
         let shutdown = this[_controller$] == null || dart.test(this[_controller$].isClosed);
         if (this[_onCancelHandler] != null) {
-          this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+          this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
         }
         if (shutdown) {
           if (this[_subscription] != null) {
@@ -21112,7 +21296,7 @@
       }
       [_onListen]() {
         if (this[_onListenHandler] != null) {
-          this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+          this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
         }
       }
       [_cancelSubscription]() {
@@ -21547,7 +21731,6 @@
         [_subscription]: StreamSubscriptionOfS()
       }),
       methods: () => ({
-        [_add$]: dart.definiteFunctionType(dart.void, [T]),
         [_handleData]: dart.definiteFunctionType(dart.void, [S]),
         [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace]),
         [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -21599,8 +21782,7 @@
     }
     dart.setSignature(_WhereStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._WhereStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _WhereStream;
   });
@@ -21637,8 +21819,7 @@
     }
     dart.setSignature(_MapStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._MapStream$(S, T), [StreamOfS(), _TransformationOfS$T()])}),
-      fields: () => ({[_transform]: _TransformationOfS$T()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+      fields: () => ({[_transform]: _TransformationOfS$T()})
     });
     return _MapStream;
   });
@@ -21670,8 +21851,7 @@
     }
     dart.setSignature(_ExpandStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._ExpandStream$(S, T), [StreamOfS(), _TransformationOfS$IterableOfT()])}),
-      fields: () => ({[_expand]: _TransformationOfS$IterableOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+      fields: () => ({[_expand]: _TransformationOfS$IterableOfT()})
     });
     return _ExpandStream;
   });
@@ -21760,11 +21940,7 @@
     }
     dart.setSignature(_TakeStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._TakeStream$(T), [StreamOfT(), core.int])}),
-      fields: () => ({[_count]: core.int}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_count]: core.int})
     });
     return _TakeStream;
   });
@@ -21838,8 +22014,7 @@
     }
     dart.setSignature(_TakeWhileStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._TakeWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _TakeWhileStream;
   });
@@ -21872,11 +22047,7 @@
     }
     dart.setSignature(_SkipStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._SkipStream$(T), [StreamOfT(), core.int])}),
-      fields: () => ({[_count]: core.int}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_count]: core.int})
     });
     return _SkipStream;
   });
@@ -21922,11 +22093,7 @@
     }
     dart.setSignature(_SkipWhileStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._SkipWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _SkipWhileStream;
   });
@@ -21980,7 +22147,6 @@
         [_equals]: _EqualityOfT(),
         [_previous$]: core.Object
       }),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])}),
       sfields: () => ({_SENTINEL: core.Object})
     });
     return _DistinctStream;
@@ -22121,7 +22287,6 @@
       }),
       getters: () => ({[_isSubscribed]: dart.definiteFunctionType(core.bool, [])}),
       methods: () => ({
-        [_add$]: dart.definiteFunctionType(dart.void, [T]),
         [_handleData]: dart.definiteFunctionType(dart.void, [S]),
         [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic], [dart.dynamic]),
         [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -22289,7 +22454,6 @@
     }
     dart.setSignature(_StreamHandlerTransformer, {
       constructors: () => ({new: dart.definiteFunctionType(async._StreamHandlerTransformer$(S, T), [], {handleData: SAndEventSinkOfTTovoid(), handleError: ObjectAndStackTraceAndEventSinkOfTTovoid(), handleDone: EventSinkOfTTovoid()})}),
-      methods: () => ({bind: dart.definiteFunctionType(async.Stream$(T), [StreamOfS()])}),
       statics: () => ({
         _defaultHandleData: dart.definiteFunctionType(dart.void, [dart.dynamic, async.EventSink]),
         _defaultHandleError: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace, async.EventSink]),
@@ -22368,7 +22532,7 @@
       if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
         return async.Zone.current.createTimer(duration, callback);
       }
-      return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+      return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
     }
     static periodic(duration, callback) {
       if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
@@ -23107,7 +23271,7 @@
   dart.fn(async._rootScheduleMicrotask, ZoneAndZoneDelegateAndZone__Tovoid());
   async._rootCreateTimer = function(self, parent, zone, duration, callback) {
     if (!core.identical(async._ROOT_ZONE, zone)) {
-      callback = zone.bindCallback(dart.dynamic)(callback);
+      callback = zone.bindCallback(dart.void)(callback);
     }
     return async.Timer._createTimer(duration, callback);
   };
@@ -23870,11 +24034,6 @@
         [_equals$]: _EqualityOfK(),
         [_hashCode]: _HasherOfK(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        remove: dart.definiteFunctionType(V, [core.Object])
       })
     });
     dart.defineExtensionMembers(_CustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -23917,8 +24076,7 @@
     dart.setSignature(_HashMapKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._HashMapKeyIterable$(E), [_HashMapOfE$dynamic()])}),
       fields: () => ({[_map$0]: _HashMapOfE$dynamic()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(_HashMapKeyIterable, [
       'contains',
@@ -24115,19 +24273,7 @@
         [_map$0]: dart.dynamic,
         [_modifications$]: core.int
       }),
-      getters: () => ({
-        keys: dart.definiteFunctionType(core.Iterable$(K), []),
-        values: dart.definiteFunctionType(core.Iterable$(V), [])
-      }),
-      methods: () => ({
-        addAll: dart.definiteFunctionType(dart.void, [MapOfK$V()]),
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        putIfAbsent: dart.definiteFunctionType(V, [K, VoidToV()]),
-        remove: dart.definiteFunctionType(V, [core.Object]),
-        forEach: dart.definiteFunctionType(dart.void, [KAndVTovoid()]),
-        [_modified$]: dart.definiteFunctionType(dart.void, [])
-      })
+      methods: () => ({[_modified$]: dart.definiteFunctionType(dart.void, [])})
     });
     dart.defineExtensionMembers(_Es6LinkedIdentityHashMap, [
       'containsKey',
@@ -24197,8 +24343,7 @@
         [_map$0]: dart.dynamic,
         [_isKeys]: core.bool
       }),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(_Es6MapIterable, [
       'contains',
@@ -24317,11 +24462,6 @@
         [_equals$]: _EqualityOfK(),
         [_hashCode]: _HasherOfK(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        remove: dart.definiteFunctionType(V, [core.Object])
       })
     });
     dart.defineExtensionMembers(_LinkedCustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -24693,11 +24833,7 @@
       }
     }
     dart.setSignature(_HashSetBase, {
-      methods: () => ({
-        difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      methods: () => ({toSet: dart.definiteFunctionType(core.Set$(E), [])})
     });
     dart.defineExtensionMembers(_HashSetBase, ['toSet']);
     return _HashSetBase;
@@ -24947,7 +25083,6 @@
         [_lookup]: dart.definiteFunctionType(E, [core.Object]),
         add: dart.definiteFunctionType(core.bool, [E]),
         [_add$0]: dart.definiteFunctionType(core.bool, [E]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
         [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
         [_computeElements]: dart.definiteFunctionType(core.List$(E), []),
@@ -24998,9 +25133,6 @@
         return -1;
       }
     }
-    dart.setSignature(_IdentityHashSet, {
-      methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-    });
     return _IdentityHashSet;
   });
   collection._IdentityHashSet = _IdentityHashSet();
@@ -25054,11 +25186,6 @@
         [_equality]: _EqualityOfE(),
         [_hasher]: _HasherOfE(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-        add: dart.definiteFunctionType(core.bool, [E]),
-        lookup: dart.definiteFunctionType(E, [core.Object])
       })
     });
     dart.defineExtensionMembers(_CustomHashSet, ['contains']);
@@ -25390,9 +25517,7 @@
       }),
       getters: () => ({
         iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        length: dart.definiteFunctionType(core.int, []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, [])
+        length: dart.definiteFunctionType(core.int, [])
       }),
       methods: () => ({
         [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
@@ -25401,13 +25526,10 @@
         [_contains]: dart.definiteFunctionType(core.bool, [core.Object]),
         lookup: dart.definiteFunctionType(E, [core.Object]),
         [_lookup]: dart.definiteFunctionType(E, [core.Object]),
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
         add: dart.definiteFunctionType(core.bool, [E]),
         [_add$0]: dart.definiteFunctionType(core.bool, [E]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
         [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
-        removeWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
-        retainWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
         [_filterWhere]: dart.definiteFunctionType(dart.void, [ETobool(), core.bool]),
         [_addHashTableEntry$]: dart.definiteFunctionType(core.bool, [dart.dynamic, E]),
         [_removeHashTableEntry$]: dart.definiteFunctionType(core.bool, [dart.dynamic, core.Object]),
@@ -25463,9 +25585,6 @@
         return -1;
       }
     }
-    dart.setSignature(_LinkedIdentityHashSet, {
-      methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-    });
     return _LinkedIdentityHashSet;
   });
   collection._LinkedIdentityHashSet = _LinkedIdentityHashSet();
@@ -25531,11 +25650,6 @@
         [_equality]: _EqualityOfE(),
         [_hasher]: _HasherOfE(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-        add: dart.definiteFunctionType(core.bool, [E]),
-        lookup: dart.definiteFunctionType(E, [core.Object])
       })
     });
     dart.defineExtensionMembers(_LinkedCustomHashSet, ['contains']);
@@ -26481,19 +26595,13 @@
         [_length$1]: core.int,
         [_first$]: E
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
         addFirst: dart.definiteFunctionType(dart.void, [E]),
         add: dart.definiteFunctionType(dart.void, [E]),
         addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [E]),
         clear: dart.definiteFunctionType(dart.void, []),
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
         [_insertBefore$]: dart.definiteFunctionType(dart.void, [E, E], {updateFirst: core.bool}),
         [_unlink$]: dart.definiteFunctionType(dart.void, [E])
       })
@@ -26785,12 +26893,7 @@
     dart.setSignature(_MapBaseValueIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._MapBaseValueIterable$(K, V), [MapOfK$V()])}),
       fields: () => ({[_map$0]: MapOfK$V()}),
-      getters: () => ({
-        first: dart.definiteFunctionType(V, []),
-        single: dart.definiteFunctionType(V, []),
-        last: dart.definiteFunctionType(V, []),
-        iterator: dart.definiteFunctionType(core.Iterator$(V), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(V), [])})
     });
     dart.defineExtensionMembers(_MapBaseValueIterable, [
       'length',
@@ -27463,12 +27566,7 @@
         [_sentinel]: _DoubleLinkedQueueSentinelOfE(),
         [_elementCount]: core.int
       }),
-      getters: () => ({
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, []),
-        iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])}),
       methods: () => ({
         addLast: dart.definiteFunctionType(dart.void, [E]),
         addFirst: dart.definiteFunctionType(dart.void, [E]),
@@ -27840,16 +27938,8 @@
         [_tail]: core.int,
         [_modificationCount]: core.int
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
         add: dart.definiteFunctionType(dart.void, [E]),
         addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
@@ -28550,8 +28640,7 @@
     dart.setSignature(_SplayTreeKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._SplayTreeKeyIterable$(K), [_SplayTreeOfK$_SplayTreeNodeOfK()])}),
       fields: () => ({[_tree]: _SplayTreeOfK$_SplayTreeNodeOfK()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])}),
-      methods: () => ({toSet: dart.definiteFunctionType(core.Set$(K), [])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])})
     });
     dart.defineExtensionMembers(_SplayTreeKeyIterable, ['toSet', 'length', 'isEmpty', 'iterator']);
     return _SplayTreeKeyIterable;
@@ -28821,24 +28910,14 @@
         [_comparator]: ComparatorOfE(),
         [_validKey]: collection._Predicate
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
         [_compare]: dart.definiteFunctionType(core.int, [E, E]),
         add: dart.definiteFunctionType(core.bool, [E]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         lookup: dart.definiteFunctionType(E, [core.Object]),
-        intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        union: dart.definiteFunctionType(core.Set$(E), [SetOfE()]),
         [_clone]: dart.definiteFunctionType(collection.SplayTreeSet$(E), []),
-        [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()]),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
+        [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()])
       })
     });
     dart.defineExtensionMembers(SplayTreeSet, [
@@ -28905,7 +28984,7 @@
   const _data = Symbol('_data');
   const _isUpgraded = Symbol('_isUpgraded');
   const _upgradedMap = Symbol('_upgradedMap');
-  const _process = Symbol('_process');
+  const _process$ = Symbol('_process');
   const _upgrade = Symbol('_upgrade');
   convert._JsonMap = class _JsonMap extends core.Object {
     new(original) {
@@ -28920,7 +28999,7 @@
         return null;
       } else {
         let result = convert._JsonMap._getProperty(this[_processed], core.String._check(key));
-        if (dart.test(convert._JsonMap._isUnprocessed(result))) result = this[_process](core.String._check(key));
+        if (dart.test(convert._JsonMap._isUnprocessed(result))) result = this[_process$](core.String._check(key));
         return result;
       }
     }
@@ -29048,7 +29127,7 @@
       dart.assert(this[_isUpgraded]);
       return result;
     }
-    [_process](key) {
+    [_process$](key) {
       if (!dart.test(convert._JsonMap._hasProperty(this[_original], key))) return null;
       let result = convert._convertJsonToDartLazy(convert._JsonMap._getProperty(this[_original], key));
       return convert._JsonMap._setProperty(this[_processed], key, result);
@@ -29101,7 +29180,7 @@
       forEach: dart.definiteFunctionType(dart.void, [dynamicAnddynamicTovoid()]),
       [_computeKeys$]: dart.definiteFunctionType(core.List$(core.String), []),
       [_upgrade]: dart.definiteFunctionType(core.Map, []),
-      [_process]: dart.definiteFunctionType(dart.dynamic, [core.String])
+      [_process$]: dart.definiteFunctionType(dart.dynamic, [core.String])
     }),
     statics: () => ({
       _hasProperty: dart.definiteFunctionType(core.bool, [dart.dynamic, core.String]),
@@ -29152,7 +29231,6 @@
   dart.setSignature(convert._JsonMapKeyIterable, {
     constructors: () => ({new: dart.definiteFunctionType(convert._JsonMapKeyIterable, [convert._JsonMap])}),
     fields: () => ({[_parent]: convert._JsonMap}),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator, [])}),
     methods: () => ({elementAt: dart.definiteFunctionType(core.String, [core.int])})
   });
   dart.defineExtensionMembers(convert._JsonMapKeyIterable, ['elementAt', 'contains', 'length', 'iterator']);
@@ -29577,8 +29655,7 @@
     fields: () => ({[_subsetMask]: core.int}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
     })
   });
   convert.AsciiEncoder = class AsciiEncoder extends convert._UnicodeSubsetEncoder {
@@ -29668,8 +29745,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-      [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()])
+      [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int])
     })
   });
   convert.AsciiDecoder = class AsciiDecoder extends convert._UnicodeSubsetDecoder {
@@ -29692,8 +29768,7 @@
     }
   };
   dart.setSignature(convert.AsciiDecoder, {
-    constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})}),
-    methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+    constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})})
   });
   const _utf8Sink = Symbol('_utf8Sink');
   let const$30;
@@ -30708,8 +30783,7 @@
       fields: () => ({[_codec]: CodecOfS$T()}),
       getters: () => ({
         encoder: dart.definiteFunctionType(convert.Converter$(T, S), []),
-        decoder: dart.definiteFunctionType(convert.Converter$(S, T), []),
-        inverted: dart.definiteFunctionType(convert.Codec$(S, T), [])
+        decoder: dart.definiteFunctionType(convert.Converter$(S, T), [])
       })
     });
     return _InvertedCodec;
@@ -30740,15 +30814,12 @@
         [_first$0]: ConverterOfS$M(),
         [_second]: ConverterOfM$T()
       }),
-      methods: () => ({
-        convert: dart.definiteFunctionType(T, [S]),
-        startChunkedConversion: dart.definiteFunctionType(core.Sink$(S), [SinkOfT()])
-      })
+      methods: () => ({convert: dart.definiteFunctionType(T, [S])})
     });
     return _FusedConverter;
   });
   convert._FusedConverter = _FusedConverter();
-  const _name$0 = Symbol('_name');
+  const _name$1 = Symbol('_name');
   let const$34;
   let const$35;
   let const$36;
@@ -30759,7 +30830,7 @@
   let const$41;
   convert.HtmlEscapeMode = class HtmlEscapeMode extends core.Object {
     _(name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) {
-      this[_name$0] = name;
+      this[_name$1] = name;
       this.escapeLtGt = escapeLtGt;
       this.escapeQuot = escapeQuot;
       this.escapeApos = escapeApos;
@@ -30775,10 +30846,10 @@
       this.escapeQuot = escapeQuot;
       this.escapeApos = escapeApos;
       this.escapeSlash = escapeSlash;
-      this[_name$0] = name;
+      this[_name$1] = name;
     }
     toString() {
-      return this[_name$0];
+      return this[_name$1];
     }
   };
   dart.defineNamedConstructor(convert.HtmlEscapeMode, '_');
@@ -30788,7 +30859,7 @@
       new: dart.definiteFunctionType(convert.HtmlEscapeMode, [], {name: core.String, escapeLtGt: core.bool, escapeQuot: core.bool, escapeApos: core.bool, escapeSlash: core.bool})
     }),
     fields: () => ({
-      [_name$0]: core.String,
+      [_name$1]: core.String,
       escapeLtGt: core.bool,
       escapeQuot: core.bool,
       escapeApos: core.bool,
@@ -31062,9 +31133,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [core.Object]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfObject()]),
-      fuse: dart.definiteFunctionType(T => [convert.Converter$(core.Object, T), [convert.Converter$(core.String, T)]])
+      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()])
     })
   });
   const _indent = Symbol('_indent');
@@ -31138,8 +31207,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.Object]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfObject()])
+      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()])
     }),
     sfields: () => ({DEFAULT_BUFFER_SIZE: core.int}),
     statics: () => ({_utf8Encode: dart.definiteFunctionType(core.List$(core.int), [core.String])}),
@@ -31246,8 +31314,7 @@
     fields: () => ({[_reviver]: convert._Reviver}),
     methods: () => ({
       convert: dart.definiteFunctionType(dart.dynamic, [core.String]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.Object), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()])
     })
   });
   convert._parseJson = function(source, reviver) {
@@ -31844,8 +31911,7 @@
     }
   };
   dart.setSignature(convert.Latin1Decoder, {
-    constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})}),
-    methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+    constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})})
   });
   const _addSliceToSink = Symbol('_addSliceToSink');
   convert._Latin1DecoderSink = class _Latin1DecoderSink extends convert.ByteConversionSinkBase {
@@ -32433,8 +32499,7 @@
     constructors: () => ({new: dart.definiteFunctionType(convert.Utf8Encoder, [])}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
     })
   });
   convert._Utf8Encoder = class _Utf8Encoder extends core.Object {
@@ -32679,9 +32744,7 @@
     fields: () => ({[_allowMalformed]: core.bool}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()]),
-      fuse: dart.definiteFunctionType(T => [convert.Converter$(core.List$(core.int), T), [convert.Converter$(core.String, T)]])
+      startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])
     }),
     statics: () => ({_convertIntercepted: dart.definiteFunctionType(core.String, [core.bool, ListOfint(), core.int, core.int])}),
     names: ['_convertIntercepted']
@@ -34198,10 +34261,6 @@
         [_generator$]: _GeneratorOfE()
       }),
       getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int])
-      }),
       statics: () => ({_id: dart.definiteFunctionType(core.int, [core.int])}),
       names: ['_id']
     });
@@ -34528,10 +34587,7 @@
   dart.setSignature(core.Runes, {
     constructors: () => ({new: dart.definiteFunctionType(core.Runes, [core.String])}),
     fields: () => ({string: core.String}),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.RuneIterator, []),
-      last: dart.definiteFunctionType(core.int, [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.RuneIterator, [])})
   });
   dart.defineExtensionMembers(core.Runes, ['iterator', 'last']);
   core._isLeadSurrogate = function(code) {
@@ -38562,8 +38618,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot resolve symbolic links", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfString()._check(response);
+      }, dynamicToFutureOrOfString()));
     }
     resolveSymbolicLinksSync() {
       let result = io.FileSystemEntity._resolveSymbolicLinks(this.path);
@@ -38588,8 +38644,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, dart.str`Error in FileSystemEntity.identical(${path1}, ${path2})`, ""));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfbool()._check(response);
+      }, dynamicToFutureOrOfbool()));
     }
     get isAbsolute() {
       if (dart.test(io.Platform.isWindows)) {
@@ -38684,8 +38740,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Error getting type", path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     static _throwIfError(result, msg, path) {
       if (path === void 0) path = null;
@@ -38880,7 +38936,7 @@
           } else {
             return this.create();
           }
-        }, boolTodynamic()));
+        }, boolToFutureOrOfDirectory()));
       } else {
         return io._IOService._dispatch(io._DIRECTORY_CREATE, JSArrayOfString().of([this.path])).then(io._Directory)(dart.fn(response => {
           if (dart.test(this[_isErrorResponse](response))) {
@@ -39101,7 +39157,7 @@
           this.error(response);
           this.close();
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
     }
     onResume() {
       if (!dart.test(this.nextRunning)) {
@@ -39166,7 +39222,7 @@
         } else {
           this.controller.addError(new io.FileSystemException("Internal error"));
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
     }
     [_cleanup]() {
       this.controller.close();
@@ -39308,6 +39364,9 @@
       }[this.index];
     }
   };
+  dart.setSignature(io.FileLock, {
+    fields: () => ({index: core.int})
+  });
   dart.defineEnumValues(io.FileLock, [
     'SHARED',
     'EXCLUSIVE'
@@ -39473,7 +39532,7 @@
         if (dart.test(this[_atEnd])) {
           this[_closeFile]();
         }
-      }, ListOfintTodynamic())).catchError(dart.fn((e, s) => {
+      }, ListOfintToFutureOr())).catchError(dart.fn((e, s) => {
         if (!dart.test(this[_unsubscribed])) {
           this[_controller$0].addError(e, core.StackTrace._check(s));
           this[_closeFile]();
@@ -39496,7 +39555,7 @@
       dart.fn(onReady, RandomAccessFileTovoid());
       const onOpenFile = (function(file) {
         if (dart.notNull(this[_position$0]) > 0) {
-          file.setPosition(this[_position$0]).then(dart.dynamic)(onReady, {onError: dart.fn((e, s) => {
+          file.setPosition(this[_position$0]).then(dart.void)(onReady, {onError: dart.fn((e, s) => {
               this[_controller$0].addError(e, core.StackTrace._check(s));
               this[_readInProgress] = false;
               this[_closeFile]();
@@ -39513,7 +39572,7 @@
       }).bind(this);
       dart.fn(openFailed, dynamicAnddynamicTovoid$());
       if (this[_path$] != null) {
-        io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.dynamic)(onOpenFile, {onError: openFailed});
+        io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.void)(onOpenFile, {onError: openFailed});
       } else {
         try {
           onOpenFile(io._File._openStdioSync(0));
@@ -39580,7 +39639,7 @@
         _subscription = stream.listen(dart.fn(d => {
           dart.dsend(_subscription, 'pause');
           try {
-            openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileTodynamic()), {onError: error});
+            openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileToFutureOr()), {onError: error});
           } catch (e) {
             let stackTrace = dart.stackTrace(e);
             error(e, stackTrace);
@@ -39589,7 +39648,7 @@
         }, ListOfintTovoid$()), {onDone: dart.fn(() => {
             completer.complete(this[_file]);
           }, VoidTovoid$()), onError: error, cancelOnError: true});
-      }, RandomAccessFileTodynamic())).catchError(dart.bind(completer, 'completeError'));
+      }, RandomAccessFileToFutureOr())).catchError(dart.bind(completer, 'completeError'));
       return completer.future;
     }
     close() {
@@ -39627,8 +39686,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot check existence", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfbool()._check(response);
+      }, dynamicToFutureOrOfbool()));
     }
     static _exists(path) {
       dart.throw(new core.UnsupportedError("File._exists"));
@@ -39752,8 +39811,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot retrieve length of file", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     static _lengthFromPath(path) {
       dart.throw(new core.UnsupportedError("File._lengthFromPath"));
@@ -39891,7 +39950,7 @@
       return this.open({mode: mode}).then(io.File)(dart.fn(file => file.writeFrom(bytes, 0, bytes[dartx.length]).then(dart.dynamic)(dart.fn(_ => {
         if (dart.test(flush)) return file.flush().then(io._File)(dart.fn(_ => this, RandomAccessFileTo_File()));
         return this;
-      }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileTodynamic()));
+      }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileToFutureOrOfFile()));
     }
     writeAsBytesSync(bytes, opts) {
       let mode = opts && 'mode' in opts ? opts.mode : io.FileMode.WRITE;
@@ -40052,8 +40111,8 @@
           dart.throw(io._exceptionFromResponse(response, "readByte failed", this.path));
         }
         this[_resourceInfo].addRead(1);
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     readByteSync() {
       this[_checkAvailable]();
@@ -40073,8 +40132,8 @@
           dart.throw(io._exceptionFromResponse(response, "read failed", this.path));
         }
         this[_resourceInfo].addRead(core.int._check(dart.dload(dart.dindex(response, 1), 'length')));
-        return dart.dindex(response, 1);
-      }, dynamicTodynamic$()));
+        return FutureOrOfListOfint()._check(dart.dindex(response, 1));
+      }, dynamicToFutureOrOfListOfint()));
     }
     readSync(bytes) {
       this[_checkAvailable]();
@@ -40107,8 +40166,8 @@
         let data = dart.dindex(response, 2);
         buffer[dartx.setRange](start, dart.asInt(dart.notNull(start) + dart.notNull(core.num._check(read))), IterableOfint()._check(data));
         this[_resourceInfo].addRead(core.int._check(read));
-        return read;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(read);
+      }, dynamicToFutureOrOfint()));
     }
     readIntoSync(buffer, start, end) {
       if (start === void 0) start = 0;
@@ -40221,8 +40280,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "position failed", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     positionSync() {
       this[_checkAvailable]();
@@ -40267,8 +40326,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "length failed", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     lengthSync() {
       this[_checkAvailable]();
@@ -43009,7 +43068,7 @@
         } else {
           return this;
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOrOfHttpClientResponse()));
     }
   };
   io._HttpClientResponse[dart.implements] = () => [io.HttpClientResponse];
@@ -43122,7 +43181,7 @@
         return this.done;
       }
       [_closeTarget]() {
-        this[_target$].close().then(dart.dynamic)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
+        this[_target$].close().then(dart.void)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
       }
       get done() {
         return this[_doneCompleter].future;
@@ -43156,7 +43215,7 @@
             } else {
               this[_closeTarget]();
             }
-          }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+          }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
               if (dart.test(this[_isBound])) {
                 this[_controllerCompleter].completeError(error, core.StackTrace._check(stackTrace));
                 this[_controllerCompleter] = null;
@@ -43344,8 +43403,7 @@
         contentLength: dart.definiteFunctionType(dart.void, [core.int]),
         persistentConnection: dart.definiteFunctionType(dart.void, [core.bool]),
         bufferOutput: dart.definiteFunctionType(dart.void, [core.bool])
-      }),
-      methods: () => ({add: dart.definiteFunctionType(dart.void, [ListOfint()])})
+      })
     });
     return _HttpOutboundMessage;
   });
@@ -43739,7 +43797,7 @@
     }
     get done() {
       if (this[_response] == null) {
-        this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => list[dartx._get](0), ListTodynamic()));
+        this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => FutureOrOfHttpClientResponse()._check(list[dartx._get](0)), ListToFutureOrOfHttpClientResponse()));
       }
       return this[_response];
     }
@@ -43780,7 +43838,7 @@
       } else {
         future = FutureOfHttpClientResponse().value(response);
       }
-      future.then(dart.dynamic)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
+      future.then(dart.void)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
     }
     [_onError$](error, stackTrace) {
       this[_responseCompleter].completeError(error, stackTrace);
@@ -44306,7 +44364,7 @@
         if (incoming.statusCode == 100) {
           incoming.drain(dart.dynamic)().then(dart.dynamic)(dart.fn(_ => {
             this[_subscription$].resume();
-          }, dynamicTodynamic$())).catchError(dart.fn((error, stackTrace) => {
+          }, dynamicToFutureOr$())).catchError(dart.fn((error, stackTrace) => {
             if (stackTrace === void 0) stackTrace = null;
             this[_nextResponseCompleter].completeError(new io.HttpException(core.String._check(dart.dload(error, 'message')), {uri: this[_currentUri]}), stackTrace);
             this[_nextResponseCompleter] = null;
@@ -44383,7 +44441,7 @@
             } else {
               this.destroy();
             }
-          }, dynamicTodynamic$()));
+          }, dynamicToFutureOr$()));
           if (proxyCreds != null && dart.equals(proxyCreds.scheme, io._AuthenticationScheme.DIGEST)) {
             let authInfo = incoming.headers._get("proxy-authentication-info");
             if (authInfo != null && authInfo[dartx.length] == 1) {
@@ -44401,7 +44459,7 @@
             }
           }
           request[_onIncoming](incoming);
-        }, _HttpIncomingTodynamic())).catchError(dart.fn(error => {
+        }, _HttpIncomingToFutureOr())).catchError(dart.fn(error => {
           dart.throw(new io.HttpException("Connection closed before data was received", {uri: uri}));
         }, dynamicTodynamic$()), {test: dart.fn(error => core.StateError.is(error), ObjectTobool())}).catchError(dart.fn((error, stackTrace) => {
           this.destroy();
@@ -44425,7 +44483,7 @@
     close() {
       this.closed = true;
       this[_httpClient][_connectionClosed](this);
-      this[_streamFuture].then(dart.dynamic)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
+      this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
     }
     createProxyTunnel(host, port, proxy, callback) {
       let request = this.send(core.Uri.new({host: core.String._check(host), port: core.int._check(port)}), core.int._check(port), "CONNECT", io._Proxy._check(proxy));
@@ -44584,7 +44642,7 @@
       if (client.maxConnectionsPerHost != null && dart.notNull(this[_active].length) + dart.notNull(this[_connecting]) >= dart.notNull(client.maxConnectionsPerHost)) {
         let completer = async.Completer.new();
         this[_pending$].add(dart.fn(() => {
-          this.connect(uriHost, uriPort, proxy, client).then(dart.dynamic)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
+          this.connect(uriHost, uriPort, proxy, client).then(dart.void)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
         }, VoidTodynamic$()));
         return FutureOf_ConnectionInfo()._check(completer.future);
       }
@@ -44610,7 +44668,7 @@
           this.addNewActive(connection);
           return new io._ConnectionInfo(connection, proxy);
         }
-      }, dynamicTodynamic$()), {onError: dart.fn(error => {
+      }, dynamicToFutureOrOf_ConnectionInfo()), {onError: dart.fn(error => {
           this[_connecting] = dart.notNull(this[_connecting]) - 1;
           this[_checkPending]();
           dart.throw(error);
@@ -44809,7 +44867,7 @@
           return this[_getConnection](uri.host, port, proxyConf, isSecure).then(io._HttpClientRequest)(send);
         }
         return send(info);
-      }, _ConnectionInfoTodynamic()));
+      }, _ConnectionInfoToFutureOrOf_HttpClientRequest()));
     }
     [_openUrlFromRequest](method, uri, previous) {
       let resolved = previous.uri.resolveUri(uri);
@@ -45093,7 +45151,7 @@
         this[_httpServer][_markActive](this);
         incoming.dataDone.then(dart.dynamic)(dart.fn(closing => {
           if (dart.test(closing)) this.destroy();
-        }, dynamicTodynamic$()));
+        }, dynamicToFutureOr$()));
         this[_subscription$].pause();
         this[_state$1] = io._HttpConnection._ACTIVE;
         let outgoing = new io._HttpOutgoing(io.Socket._check(this[_socket]));
@@ -45110,7 +45168,7 @@
           } else {
             this.destroy();
           }
-        }, dynamicTodynamic$()), {onError: dart.fn(_ => {
+        }, dynamicToFutureOr$()), {onError: dart.fn(_ => {
             this.destroy();
           }, dynamicTodynamic$())});
         outgoing.ignoreBody = request.method == "HEAD";
@@ -47913,8 +47971,8 @@
         if (dart.test(this[_isErrorResponse](response))) {
           dart.throw(this[_exceptionFromResponse](response, "Cannot get target of link", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfString()._check(response);
+      }, dynamicToFutureOrOfString()));
     }
     targetSync() {
       let result = io._File._linkTarget(this.path);
@@ -48382,6 +48440,9 @@
       }[this.index];
     }
   };
+  dart.setSignature(io.ProcessStartMode, {
+    fields: () => ({index: core.int})
+  });
   dart.defineEnumValues(io.ProcessStartMode, [
     'NORMAL',
     'DETACHED',
@@ -48450,14 +48511,14 @@
     })
   });
   const _signalNumber = Symbol('_signalNumber');
-  const _name$1 = Symbol('_name');
+  const _name$2 = Symbol('_name');
   io.ProcessSignal = class ProcessSignal extends core.Object {
     _(signalNumber, name) {
       this[_signalNumber] = signalNumber;
-      this[_name$1] = name;
+      this[_name$2] = name;
     }
     toString() {
-      return this[_name$1];
+      return this[_name$2];
     }
     watch() {
       return io._ProcessUtils._watchSignal(this);
@@ -48468,7 +48529,7 @@
     constructors: () => ({_: dart.definiteFunctionType(io.ProcessSignal, [core.int, core.String])}),
     fields: () => ({
       [_signalNumber]: core.int,
-      [_name$1]: core.String
+      [_name$2]: core.String
     }),
     methods: () => ({watch: dart.definiteFunctionType(async.Stream$(io.ProcessSignal), [])}),
     sfields: () => ({
@@ -48824,7 +48885,7 @@
         } else {
           this[_controller$0].add(secureConnection);
         }
-      }, RawSecureSocketTodynamic())).catchError(dart.fn((e, s) => {
+      }, RawSecureSocketToFutureOr())).catchError(dart.fn((e, s) => {
         if (!dart.test(this[_closed])) {
           this[_controller$0].addError(e, core.StackTrace._check(s));
         }
@@ -49123,7 +49184,7 @@
       this[_closedWrite] = true;
       this[_closedRead] = true;
       if (this[_socket] != null) {
-        this[_socket].close().then(dart.dynamic)(dart.bind(this, _completeCloseCompleter));
+        this[_socket].close().then(dart.void)(dart.bind(this, _completeCloseCompleter));
       } else {
         this[_completeCloseCompleter]();
       }
@@ -49408,7 +49469,7 @@
             }
           }
           this[_tryFilter]();
-        }, _FilterStatusTodynamic())).catchError(dart.bind(this, _reportError));
+        }, _FilterStatusToFutureOr())).catchError(dart.bind(this, _reportError));
       }
     }
     [_readSocketOrBufferedData](bytes) {
@@ -50683,10 +50744,6 @@
       name: dart.definiteFunctionType(core.String, []),
       encoder: dart.definiteFunctionType(convert.Converter$(core.String, core.List$(core.int)), []),
       decoder: dart.definiteFunctionType(convert.Converter$(core.List$(core.int), core.String), [])
-    }),
-    methods: () => ({
-      encode: dart.definiteFunctionType(core.List$(core.int), [core.String]),
-      decode: dart.definiteFunctionType(core.String, [ListOfint()])
     })
   });
   io.SYSTEM_ENCODING = dart.const(new io.SystemEncoding());
@@ -51488,7 +51545,7 @@
     }
     bind(stream) {
       stream.listen(dart.fn(request => {
-        io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.dynamic)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
+        io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.void)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
       }, HttpRequestTovoid$()), {onDone: dart.fn(() => {
           this[_controller$0].close();
         }, VoidTovoid$())});
@@ -51901,7 +51958,7 @@
       this.socket.addStream(stream).then(dart.dynamic)(dart.fn(_ => {
         this[_done$]();
         this[_closeCompleter].complete(this.webSocket);
-      }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+      }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
           this[_closed] = true;
           this[_cancel$]();
           if (core.ArgumentError.is(error)) {
@@ -52037,7 +52094,7 @@
         function error(message) {
           response.detachSocket().then(dart.dynamic)(dart.fn(socket => {
             socket.destroy();
-          }, SocketTodynamic()));
+          }, SocketToFutureOr()));
           dart.throw(new io.WebSocketException(message));
         }
         dart.fn(error, StringTovoid$());
@@ -52882,14 +52939,7 @@
         [_checkIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
         [_checkInsertIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
         _get: dart.definiteFunctionType(E, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [core.Object, E]),
-        add: dart.definiteFunctionType(dart.void, [E]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
-        insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-        removeAt: dart.definiteFunctionType(E, [core.int]),
-        removeLast: dart.definiteFunctionType(E, []),
-        setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-        sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()])
+        _set: dart.definiteFunctionType(dart.void, [core.Object, E])
       }),
       statics: () => ({_checkRange: dart.definiteFunctionType(dart.dynamic, [core.int, core.int, core.int])}),
       names: ['_checkRange']
@@ -55445,15 +55495,15 @@
       let completer = CompleterOfDatabase().new();
       this[dartx.onComplete].first.then(dart.dynamic)(dart.fn(_ => {
         completer.complete(this[dartx.db]);
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       this[dartx.onError].first.then(dart.dynamic)(dart.fn(e => {
         completer.completeError(e);
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       this[dartx.onAbort].first.then(dart.dynamic)(dart.fn(e => {
         if (!dart.test(completer.isCompleted)) {
           completer.completeError(e);
         }
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       return completer.future;
     }
     static _() {
@@ -72212,17 +72262,11 @@
   html$.DomStringList[dart.implements] = () => [ListOfString()];
   dart.setSignature(html$.DomStringList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.DomStringList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.String, []),
-      [dartx.last]: dart.definiteFunctionType(core.String, []),
-      [dartx.single]: dart.definiteFunctionType(core.String, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
       [__getter__]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx.item]: dart.definiteFunctionType(core.String, [core.int])
     })
@@ -72391,10 +72435,6 @@
     }),
     getters: () => ({
       length: dart.definiteFunctionType(core.int, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Element), []),
-      first: dart.definiteFunctionType(html$.Element, []),
-      last: dart.definiteFunctionType(html$.Element, []),
-      single: dart.definiteFunctionType(html$.Element, []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
@@ -72402,18 +72442,7 @@
       _get: dart.definiteFunctionType(html$.Element, [core.int]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
       add: dart.definiteFunctionType(html$.Element, [html$.Element]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-      sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-      removeWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-      retainWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-      [_filter$0]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-      replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Element]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-      removeAt: dart.definiteFunctionType(html$.Element, [core.int]),
-      removeLast: dart.definiteFunctionType(html$.Element, [])
+      [_filter$0]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool])
     })
   });
   dart.defineExtensionMembers(html$._ChildrenElementList, [
@@ -72728,9 +72757,6 @@
       fields: () => ({[_nodeList]: ListOfNode()}),
       getters: () => ({
         length: dart.definiteFunctionType(core.int, []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, []),
         classes: dart.definiteFunctionType(html$.CssClassSet, []),
         style: dart.definiteFunctionType(html$.CssStyleDeclarationBase, []),
         contentEdge: dart.definiteFunctionType(html$.CssRect, []),
@@ -72814,8 +72840,7 @@
       }),
       methods: () => ({
         _get: dart.definiteFunctionType(E, [core.int]),
-        _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-        sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfE()])
+        _set: dart.definiteFunctionType(dart.void, [core.int, E])
       })
     });
     dart.defineExtensionMembers(_FrozenElementList, [
@@ -73583,17 +73608,11 @@
   html$.FileList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfFile()];
   dart.setSignature(html$.FileList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.FileList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.File, []),
-      [dartx.last]: dart.definiteFunctionType(html$.File, []),
-      [dartx.single]: dart.definiteFunctionType(html$.File, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.File, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.File]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.File, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.File, [core.int])
     })
   });
@@ -75661,17 +75680,11 @@
   html$.HtmlCollection[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$.HtmlCollection, {
     constructors: () => ({_: dart.definiteFunctionType(html$.HtmlCollection, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(core.Object, [core.String])
     })
@@ -80855,17 +80868,11 @@
   html$.MimeTypeArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfMimeType()];
   dart.setSignature(html$.MimeTypeArray, {
     constructors: () => ({_: dart.definiteFunctionType(html$.MimeTypeArray, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.MimeType, []),
-      [dartx.last]: dart.definiteFunctionType(html$.MimeType, []),
-      [dartx.single]: dart.definiteFunctionType(html$.MimeType, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.MimeType]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(html$.MimeType, [core.String])
     })
@@ -81205,7 +81212,7 @@
     }
     static new(callback) {
       0;
-      return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(html$._wrapZoneBinaryCallback)(html$._wrapBinaryZone(dart.dynamic, dart.dynamic, dart.dynamic)(callback), 2));
+      return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void())(html$._wrapBinaryZone(ListOfMutationRecord(), html$.MutationObserver, dart.void)(callback), 2));
     }
   };
   dart.setSignature(html$.MutationObserver, {
@@ -81898,29 +81905,13 @@
     constructors: () => ({new: dart.definiteFunctionType(html$._ChildNodeListLazy, [html$.Node])}),
     fields: () => ({[_this]: html$.Node}),
     getters: () => ({
-      first: dart.definiteFunctionType(html$.Node, []),
-      last: dart.definiteFunctionType(html$.Node, []),
-      single: dart.definiteFunctionType(html$.Node, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Node), []),
       length: dart.definiteFunctionType(core.int, []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
-      add: dart.definiteFunctionType(dart.void, [html$.Node]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfNode()]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-      setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-      removeLast: dart.definiteFunctionType(html$.Node, []),
-      removeAt: dart.definiteFunctionType(html$.Node, [core.int]),
       [_filter$0]: dart.definiteFunctionType(dart.void, [NodeTobool(), core.bool]),
-      removeWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
-      retainWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfNode()]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfNode()], [core.int]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Node]),
       _get: dart.definiteFunctionType(html$.Node, [core.int])
     })
   });
@@ -82097,17 +82088,11 @@
   html$.NodeList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$.NodeList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.NodeList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [_item]: dart.definiteFunctionType(html$.Node, [core.int])
     })
   });
@@ -83788,17 +83773,11 @@
   html$.PluginArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfPlugin()];
   dart.setSignature(html$.PluginArray, {
     constructors: () => ({_: dart.definiteFunctionType(html$.PluginArray, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Plugin, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Plugin, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Plugin, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Plugin]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(html$.Plugin, [core.String]),
       [dartx.refresh]: dart.definiteFunctionType(dart.void, [core.bool])
@@ -87270,17 +87249,11 @@
   html$.SourceBufferList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSourceBuffer()];
   dart.setSignature(html$.SourceBufferList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.SourceBufferList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SourceBuffer, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SourceBuffer, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SourceBuffer, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SourceBuffer, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SourceBuffer]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SourceBuffer, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.SourceBuffer, [core.int])
     })
   });
@@ -87524,17 +87497,11 @@
       _: dart.definiteFunctionType(html$.SpeechGrammarList, []),
       new: dart.definiteFunctionType(html$.SpeechGrammarList, [])
     }),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SpeechGrammar, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SpeechGrammar, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SpeechGrammar, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SpeechGrammar]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int]),
       [dartx.addFromString]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
       [dartx.addFromUri]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
       [dartx.item]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int])
@@ -89732,17 +89699,11 @@
   html$.TextTrackCueList[dart.implements] = () => [ListOfTextTrackCue(), _js_helper.JavaScriptIndexingBehavior];
   dart.setSignature(html$.TextTrackCueList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.TextTrackCueList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.TextTrackCue, []),
-      [dartx.last]: dart.definiteFunctionType(html$.TextTrackCue, []),
-      [dartx.single]: dart.definiteFunctionType(html$.TextTrackCue, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.TextTrackCue, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.TextTrackCue]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.TextTrackCue, [core.int]),
       [dartx.getCueById]: dart.definiteFunctionType(html$.TextTrackCue, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.TextTrackCue, [core.int])
     })
@@ -89822,9 +89783,6 @@
     constructors: () => ({_: dart.definiteFunctionType(html$.TextTrackList, [])}),
     getters: () => ({
       [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.TextTrack, []),
-      [dartx.last]: dart.definiteFunctionType(html$.TextTrack, []),
-      [dartx.single]: dart.definiteFunctionType(html$.TextTrack, []),
       [dartx.onAddTrack]: dart.definiteFunctionType(async.Stream$(html$.TrackEvent), []),
       [dartx.onChange]: dart.definiteFunctionType(async.Stream$(html$.Event), [])
     }),
@@ -89832,7 +89790,6 @@
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.TextTrack, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.TextTrack]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.TextTrack, [core.int]),
       [dartx.getTrackById]: dart.definiteFunctionType(html$.TextTrack, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.TextTrack, [core.int])
     }),
@@ -90183,17 +90140,11 @@
       new: dart.definiteFunctionType(html$.TouchList, []),
       _: dart.definiteFunctionType(html$.TouchList, [])
     }),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Touch, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Touch, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Touch, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Touch, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Touch]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Touch, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Touch, [core.int])
     }),
     sgetters: () => ({supported: dart.definiteFunctionType(core.bool, [])})
@@ -94067,17 +94018,11 @@
   html$._ClientRectList[dart.implements] = () => [ListOfRectangleOfnum()];
   dart.setSignature(html$._ClientRectList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._ClientRectList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-      [dartx.last]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-      [dartx.single]: dart.definiteFunctionType(math.Rectangle$(core.num), [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, RectangleOfnum()]),
-      [dartx.elementAt]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [__getter__]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [dartx.item]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int])
     })
@@ -94144,17 +94089,11 @@
   html$._CssRuleList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfCssRule()];
   dart.setSignature(html$._CssRuleList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._CssRuleList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.CssRule, []),
-      [dartx.last]: dart.definiteFunctionType(html$.CssRule, []),
-      [dartx.single]: dart.definiteFunctionType(html$.CssRule, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.CssRule, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.CssRule]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.CssRule, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.CssRule, [core.int])
     })
   });
@@ -94397,17 +94336,11 @@
   html$._GamepadList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfGamepad()];
   dart.setSignature(html$._GamepadList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._GamepadList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Gamepad, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Gamepad, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Gamepad, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Gamepad, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Gamepad]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Gamepad, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Gamepad, [core.int])
     })
   });
@@ -94606,17 +94539,11 @@
   html$._NamedNodeMap[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$._NamedNodeMap, {
     constructors: () => ({_: dart.definiteFunctionType(html$._NamedNodeMap, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.getNamedItem]: dart.definiteFunctionType(html$._Attr, [core.String]),
       [dartx.getNamedItemNS]: dart.definiteFunctionType(html$._Attr, [core.String, core.String]),
       [dartx.item]: dart.definiteFunctionType(html$._Attr, [core.int]),
@@ -94816,17 +94743,11 @@
   html$._SpeechRecognitionResultList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSpeechRecognitionResult()];
   dart.setSignature(html$._SpeechRecognitionResultList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._SpeechRecognitionResultList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SpeechRecognitionResult, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SpeechRecognitionResult, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SpeechRecognitionResult]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int])
     })
   });
@@ -94894,17 +94815,11 @@
   html$._StyleSheetList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfStyleSheet()];
   dart.setSignature(html$._StyleSheetList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._StyleSheetList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.StyleSheet, []),
-      [dartx.last]: dart.definiteFunctionType(html$.StyleSheet, []),
-      [dartx.single]: dart.definiteFunctionType(html$.StyleSheet, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.StyleSheet, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.StyleSheet]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.StyleSheet, [core.int]),
       [__getter__]: dart.definiteFunctionType(html$.CssStyleSheet, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.StyleSheet, [core.int])
     })
@@ -96286,10 +96201,7 @@
         [_eventType]: core.String,
         [_useCapture]: core.bool
       }),
-      methods: () => ({
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-        listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-      })
+      methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
     });
     return _EventStream;
   });
@@ -96390,8 +96302,7 @@
       methods: () => ({
         matches: dart.definiteFunctionType(async.Stream$(T), [core.String]),
         listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-        capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()]),
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()})
+        capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()])
       })
     });
     return _ElementListEventStreamImpl;
@@ -96553,7 +96464,6 @@
       }),
       methods: () => ({
         listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
         add: dart.definiteFunctionType(dart.void, [T])
       })
     });
@@ -96831,8 +96741,7 @@
   dart.addSimpleTypeTests(html$._CustomKeyEventStreamImpl);
   html$._CustomKeyEventStreamImpl[dart.implements] = () => [CustomStreamOfKeyEvent()];
   dart.setSignature(html$._CustomKeyEventStreamImpl, {
-    constructors: () => ({new: dart.definiteFunctionType(html$._CustomKeyEventStreamImpl, [core.String])}),
-    methods: () => ({add: dart.definiteFunctionType(dart.void, [html$.KeyEvent])})
+    constructors: () => ({new: dart.definiteFunctionType(html$._CustomKeyEventStreamImpl, [core.String])})
   });
   const _subscriptions = Symbol('_subscriptions');
   const _controller$1 = Symbol('_controller');
@@ -98421,21 +98330,13 @@
       constructors: () => ({new: dart.definiteFunctionType(html$._WrappedList$(E), [ListOfNode()])}),
       fields: () => ({[_list$]: ListOfNode()}),
       getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
         length: dart.definiteFunctionType(core.int, []),
         rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
       }),
       setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
       methods: () => ({
-        add: dart.definiteFunctionType(dart.void, [E]),
         _get: dart.definiteFunctionType(E, [core.int]),
-        _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-        sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()]),
-        insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-        removeAt: dart.definiteFunctionType(E, [core.int]),
-        setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-        replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()]),
-        fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [E])
+        _set: dart.definiteFunctionType(dart.void, [core.int, E])
       })
     });
     dart.defineExtensionMembers(_WrappedList, [
@@ -99788,25 +99689,12 @@
     getters: () => ({
       [_iterable$0]: dart.definiteFunctionType(core.Iterable$(html$.Element), []),
       [_filtered]: dart.definiteFunctionType(core.List$(html$.Element), []),
-      reversed: dart.definiteFunctionType(core.Iterable$(html$.Element), []),
       length: dart.definiteFunctionType(core.int, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Element), []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
-      forEach: dart.definiteFunctionType(dart.void, [ElementTovoid()]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      add: dart.definiteFunctionType(dart.void, [html$.Element]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-      sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Element]),
-      replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-      removeLast: dart.definiteFunctionType(html$.Element, []),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-      removeAt: dart.definiteFunctionType(html$.Element, [core.int]),
       _get: dart.definiteFunctionType(html$.Element, [core.int])
     })
   });
@@ -103477,17 +103365,11 @@
   dart.setSignature(svg$.LengthList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.LengthList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Length, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Length, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Length, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Length, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Length]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Length, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Length]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Length, [svg$.Length]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.Length, [core.int]),
@@ -104083,17 +103965,11 @@
   dart.setSignature(svg$.NumberList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.NumberList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Number, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Number, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Number, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Number, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Number]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Number, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Number]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Number, [svg$.Number]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.Number, [core.int]),
@@ -105068,17 +104944,11 @@
   dart.setSignature(svg$.PathSegList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.PathSegList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.PathSeg, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.PathSeg, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.PathSeg, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.PathSeg]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.PathSeg]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.PathSeg, [svg$.PathSeg]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
@@ -105833,17 +105703,11 @@
   dart.setSignature(svg$.StringList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.StringList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.String, []),
-      [dartx.last]: dart.definiteFunctionType(core.String, []),
-      [dartx.single]: dart.definiteFunctionType(core.String, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
       [dartx.appendItem]: dart.definiteFunctionType(core.String, [core.String]),
       [dartx.getItem]: dart.definiteFunctionType(core.String, [core.int]),
@@ -106717,17 +106581,11 @@
   dart.setSignature(svg$.TransformList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.TransformList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Transform, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Transform, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Transform, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Transform, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Transform]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Transform, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Transform]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Transform, [svg$.Transform]),
       [dartx.consolidate]: dart.definiteFunctionType(svg$.Transform, []),
@@ -110764,17 +110622,11 @@
   web_sql.SqlResultSetRowList[dart.implements] = () => [ListOfMap()];
   dart.setSignature(web_sql.SqlResultSetRowList, {
     constructors: () => ({_: dart.definiteFunctionType(web_sql.SqlResultSetRowList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.Map, []),
-      [dartx.last]: dart.definiteFunctionType(core.Map, []),
-      [dartx.single]: dart.definiteFunctionType(core.Map, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.Map, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.Map]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.Map, [core.int]),
       [dartx.item]: dart.definiteFunctionType(core.Map, [core.int]),
       [_item_1]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
     })
diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
index 5364eaf..7d32f3c 100644
--- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
@@ -167,6 +167,8 @@
   let _AsyncBroadcastStreamController = () => (_AsyncBroadcastStreamController = dart.constFn(async._AsyncBroadcastStreamController$()))();
   let _AsBroadcastStreamController = () => (_AsBroadcastStreamController = dart.constFn(async._AsBroadcastStreamController$()))();
   let _DoneSubscription = () => (_DoneSubscription = dart.constFn(async._DoneSubscription$()))();
+  let FutureOr = () => (FutureOr = dart.constFn(async.FutureOr$()))();
+  let dynamicToFutureOr = () => (dynamicToFutureOr = dart.constFn(dart.functionType(async.FutureOr, [dart.dynamic])))();
   let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.functionType(dart.dynamic, [])))();
   let Future = () => (Future = dart.constFn(async.Future$()))();
   let Completer = () => (Completer = dart.constFn(async.Completer$()))();
@@ -387,14 +389,20 @@
   let ListOfListOfint = () => (ListOfListOfint = dart.constFn(core.List$(ListOfint())))();
   let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))();
   let FutureOfDirectory = () => (FutureOfDirectory = dart.constFn(async.Future$(io.Directory)))();
+  let FutureOrOfDirectory = () => (FutureOrOfDirectory = dart.constFn(async.FutureOr$(io.Directory)))();
   let StreamOfFileSystemEntity = () => (StreamOfFileSystemEntity = dart.constFn(async.Stream$(io.FileSystemEntity)))();
   let JSArrayOfFileSystemEntity = () => (JSArrayOfFileSystemEntity = dart.constFn(_interceptors.JSArray$(io.FileSystemEntity)))();
+  let FutureOrOfString = () => (FutureOrOfString = dart.constFn(async.FutureOr$(core.String)))();
+  let FutureOrOfbool = () => (FutureOrOfbool = dart.constFn(async.FutureOr$(core.bool)))();
+  let FutureOrOfint = () => (FutureOrOfint = dart.constFn(async.FutureOr$(core.int)))();
   let ListOfFileSystemEntity = () => (ListOfFileSystemEntity = dart.constFn(core.List$(io.FileSystemEntity)))();
   let StreamControllerOfListOfint = () => (StreamControllerOfListOfint = dart.constFn(async.StreamController$(ListOfint())))();
   let FutureOfRandomAccessFile = () => (FutureOfRandomAccessFile = dart.constFn(async.Future$(io.RandomAccessFile)))();
   let CompleterOfFile = () => (CompleterOfFile = dart.constFn(async.Completer$(io.File)))();
   let FutureOfListOfint = () => (FutureOfListOfint = dart.constFn(async.Future$(ListOfint())))();
+  let FutureOrOfFile = () => (FutureOrOfFile = dart.constFn(async.FutureOr$(io.File)))();
   let FutureOfFile = () => (FutureOfFile = dart.constFn(async.Future$(io.File)))();
+  let FutureOrOfListOfint = () => (FutureOrOfListOfint = dart.constFn(async.FutureOr$(ListOfint())))();
   let ListOfFileSystemEntityType = () => (ListOfFileSystemEntityType = dart.constFn(core.List$(io.FileSystemEntityType)))();
   let StreamOfHttpRequest = () => (StreamOfHttpRequest = dart.constFn(async.Stream$(io.HttpRequest)))();
   let ListOfRedirectInfo = () => (ListOfRedirectInfo = dart.constFn(core.List$(io.RedirectInfo)))();
@@ -403,6 +411,7 @@
   let StringAndListOfStringTovoid = () => (StringAndListOfStringTovoid = dart.constFn(dart.functionType(dart.void, [core.String, ListOfString()])))();
   let FutureOfHttpClientResponse = () => (FutureOfHttpClientResponse = dart.constFn(async.Future$(io.HttpClientResponse)))();
   let StreamSubscriptionOfListOfint = () => (StreamSubscriptionOfListOfint = dart.constFn(async.StreamSubscription$(ListOfint())))();
+  let FutureOrOfHttpClientResponse = () => (FutureOrOfHttpClientResponse = dart.constFn(async.FutureOr$(io.HttpClientResponse)))();
   let _StreamSinkImpl = () => (_StreamSinkImpl = dart.constFn(io._StreamSinkImpl$()))();
   let StreamConsumerOfListOfint = () => (StreamConsumerOfListOfint = dart.constFn(async.StreamConsumer$(ListOfint())))();
   let _HttpOutboundMessage = () => (_HttpOutboundMessage = dart.constFn(io._HttpOutboundMessage$()))();
@@ -414,11 +423,13 @@
   let FutureOfSecureSocket = () => (FutureOfSecureSocket = dart.constFn(async.Future$(io.SecureSocket)))();
   let HashSetOf_HttpClientConnection = () => (HashSetOf_HttpClientConnection = dart.constFn(collection.HashSet$(io._HttpClientConnection)))();
   let FutureOf_ConnectionInfo = () => (FutureOf_ConnectionInfo = dart.constFn(async.Future$(io._ConnectionInfo)))();
+  let FutureOrOf_ConnectionInfo = () => (FutureOrOf_ConnectionInfo = dart.constFn(async.FutureOr$(io._ConnectionInfo)))();
   let SetOf_HttpClientConnection = () => (SetOf_HttpClientConnection = dart.constFn(core.Set$(io._HttpClientConnection)))();
   let HashMapOfString$_ConnectionTarget = () => (HashMapOfString$_ConnectionTarget = dart.constFn(collection.HashMap$(core.String, io._ConnectionTarget)))();
   let JSArrayOf_Credentials = () => (JSArrayOf_Credentials = dart.constFn(_interceptors.JSArray$(io._Credentials)))();
   let JSArrayOf_ProxyCredentials = () => (JSArrayOf_ProxyCredentials = dart.constFn(_interceptors.JSArray$(io._ProxyCredentials)))();
   let FutureOf_HttpClientRequest = () => (FutureOf_HttpClientRequest = dart.constFn(async.Future$(io._HttpClientRequest)))();
+  let FutureOrOf_HttpClientRequest = () => (FutureOrOf_HttpClientRequest = dart.constFn(async.FutureOr$(io._HttpClientRequest)))();
   let X509CertificateAndStringAndintTobool = () => (X509CertificateAndStringAndintTobool = dart.constFn(dart.functionType(core.bool, [io.X509Certificate, core.String, core.int])))();
   let FutureOfbool = () => (FutureOfbool = dart.constFn(async.Future$(core.bool)))();
   let UriAndStringAndStringToFutureOfbool = () => (UriAndStringAndStringToFutureOfbool = dart.constFn(dart.functionType(FutureOfbool(), [core.Uri, core.String, core.String])))();
@@ -546,6 +557,7 @@
   let EventStreamProviderOfMidiMessageEvent = () => (EventStreamProviderOfMidiMessageEvent = dart.constFn(html$.EventStreamProvider$(html$.MidiMessageEvent)))();
   let ListOfMimeType = () => (ListOfMimeType = dart.constFn(core.List$(html$.MimeType)))();
   let ListOfMutationRecord = () => (ListOfMutationRecord = dart.constFn(core.List$(html$.MutationRecord)))();
+  let _wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = () => (_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = dart.constFn(html$._wrapZoneBinaryCallback$(ListOfMutationRecord(), html$.MutationObserver, dart.void)))();
   let MapOfString$bool = () => (MapOfString$bool = dart.constFn(core.Map$(core.String, core.bool)))();
   let CompleterOfMediaStream = () => (CompleterOfMediaStream = dart.constFn(async.Completer$(html$.MediaStream)))();
   let NodeTobool = () => (NodeTobool = dart.constFn(dart.functionType(core.bool, [html$.Node])))();
@@ -633,6 +645,7 @@
   let dynamicTodynamic$ = () => (dynamicTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
   let StringAndStringToint = () => (StringAndStringToint = dart.constFn(dart.definiteFunctionType(core.int, [core.String, core.String])))();
   let VoidTo_MethodStats = () => (VoidTo_MethodStats = dart.constFn(dart.definiteFunctionType(dart._MethodStats, [])))();
+  let VoidToFunctionType = () => (VoidToFunctionType = dart.constFn(dart.definiteFunctionType(dart.FunctionType, [])))();
   let dynamicToString = () => (dynamicToString = dart.constFn(dart.definiteFunctionType(core.String, [dart.dynamic])))();
   let dynamicToListOfString = () => (dynamicToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [dart.dynamic])))();
   let dynamicToList = () => (dynamicToList = dart.constFn(dart.definiteFunctionType(core.List, [dart.dynamic])))();
@@ -668,8 +681,9 @@
   let VoidTobool = () => (VoidTobool = dart.constFn(dart.definiteFunctionType(core.bool, [])))();
   let VoidTo_IsolateContext = () => (VoidTo_IsolateContext = dart.constFn(dart.definiteFunctionType(_isolate_helper._IsolateContext, [])))();
   let VoidTovoid$ = () => (VoidTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
-  let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.List])))();
+  let ListToFutureOr = () => (ListToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [core.List])))();
   let StringTodynamic = () => (StringTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.String])))();
+  let dynamicToFutureOr$ = () => (dynamicToFutureOr$ = dart.constFn(dart.definiteFunctionType(async.FutureOr, [dart.dynamic])))();
   let TimerTovoid$ = () => (TimerTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [async.Timer])))();
   let dynamicToFuture = () => (dynamicToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [dart.dynamic])))();
   let boolTodynamic = () => (boolTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.bool])))();
@@ -795,11 +809,15 @@
   let ListAndintAndintTo_BufferAndStart = () => (ListAndintAndintTo_BufferAndStart = dart.constFn(dart.definiteFunctionType(io._BufferAndStart, [core.List, core.int, core.int])))();
   let intTovoid = () => (intTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.int])))();
   let DirectoryToFutureOfDirectory = () => (DirectoryToFutureOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOfDirectory(), [io.Directory])))();
+  let boolToFutureOrOfDirectory = () => (boolToFutureOrOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOrOfDirectory(), [core.bool])))();
   let dynamicTo_Directory = () => (dynamicTo_Directory = dart.constFn(dart.definiteFunctionType(io._Directory, [dart.dynamic])))();
   let dynamicToDirectory = () => (dynamicToDirectory = dart.constFn(dart.definiteFunctionType(io.Directory, [dart.dynamic])))();
-  let ListOfintTodynamic = () => (ListOfintTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [ListOfint()])))();
+  let dynamicToFutureOrOfString = () => (dynamicToFutureOrOfString = dart.constFn(dart.definiteFunctionType(FutureOrOfString(), [dart.dynamic])))();
+  let dynamicToFutureOrOfbool = () => (dynamicToFutureOrOfbool = dart.constFn(dart.definiteFunctionType(FutureOrOfbool(), [dart.dynamic])))();
+  let dynamicToFutureOrOfint = () => (dynamicToFutureOrOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfint(), [dart.dynamic])))();
+  let ListOfintToFutureOr = () => (ListOfintToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [ListOfint()])))();
   let RandomAccessFileTovoid = () => (RandomAccessFileTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.RandomAccessFile])))();
-  let RandomAccessFileTodynamic = () => (RandomAccessFileTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RandomAccessFile])))();
+  let RandomAccessFileToFutureOr = () => (RandomAccessFileToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RandomAccessFile])))();
   let ListOfintTovoid$ = () => (ListOfintTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint()])))();
   let RandomAccessFileToFutureOfRandomAccessFile = () => (RandomAccessFileToFutureOfRandomAccessFile = dart.constFn(dart.definiteFunctionType(FutureOfRandomAccessFile(), [io.RandomAccessFile])))();
   let dynamicTo_File = () => (dynamicTo_File = dart.constFn(dart.definiteFunctionType(io._File, [dart.dynamic])))();
@@ -813,6 +831,8 @@
   let ListOfintToString = () => (ListOfintToString = dart.constFn(dart.definiteFunctionType(core.String, [ListOfint()])))();
   let RandomAccessFileTo_File = () => (RandomAccessFileTo_File = dart.constFn(dart.definiteFunctionType(io._File, [io.RandomAccessFile])))();
   let RandomAccessFileToObject = () => (RandomAccessFileToObject = dart.constFn(dart.definiteFunctionType(core.Object, [io.RandomAccessFile])))();
+  let RandomAccessFileToFutureOrOfFile = () => (RandomAccessFileToFutureOrOfFile = dart.constFn(dart.definiteFunctionType(FutureOrOfFile(), [io.RandomAccessFile])))();
+  let dynamicToFutureOrOfListOfint = () => (dynamicToFutureOrOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfListOfint(), [dart.dynamic])))();
   let dynamicToFileStat = () => (dynamicToFileStat = dart.constFn(dart.definiteFunctionType(io.FileStat, [dart.dynamic])))();
   let StringAndListOfStringToListOfString = () => (StringAndListOfStringToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [core.String, ListOfString()])))();
   let StringAndListOfStringTovoid$ = () => (StringAndListOfStringTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, ListOfString()])))();
@@ -825,22 +845,25 @@
   let _AuthenticationSchemeTo_Credentials = () => (_AuthenticationSchemeTo_Credentials = dart.constFn(dart.definiteFunctionType(io._Credentials, [io._AuthenticationScheme])))();
   let _CredentialsTovoid = () => (_CredentialsTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io._Credentials])))();
   let _AuthenticationSchemeAndStringToFuture = () => (_AuthenticationSchemeAndStringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [io._AuthenticationScheme, core.String])))();
+  let dynamicToFutureOrOfHttpClientResponse = () => (dynamicToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [dart.dynamic])))();
   let CookieTovoid = () => (CookieTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.Cookie])))();
+  let ListToFutureOrOfHttpClientResponse = () => (ListToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [core.List])))();
   let HttpClientResponseTovoid = () => (HttpClientResponseTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.HttpClientResponse])))();
   let dynamicToIterable = () => (dynamicToIterable = dart.constFn(dart.definiteFunctionType(core.Iterable, [dart.dynamic])))();
   let dynamicTo_HttpOutboundMessage = () => (dynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic])))();
   let dynamicAnddynamicTo_HttpOutboundMessage = () => (dynamicAnddynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic, dart.dynamic])))();
   let dynamic__Todynamic$ = () => (dynamic__Todynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [core.StackTrace])))();
   let _HttpIncomingTovoid$ = () => (_HttpIncomingTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [io._HttpIncoming])))();
-  let _HttpIncomingTodynamic = () => (_HttpIncomingTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._HttpIncoming])))();
+  let _HttpIncomingToFutureOr = () => (_HttpIncomingToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._HttpIncoming])))();
   let dynamicTo_DetachedSocket = () => (dynamicTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic])))();
   let SecureSocketTo_HttpClientConnection = () => (SecureSocketTo_HttpClientConnection = dart.constFn(dart.definiteFunctionType(io._HttpClientConnection, [io.SecureSocket])))();
   let HttpClientResponseToFutureOfSecureSocket = () => (HttpClientResponseToFutureOfSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfSecureSocket(), [io.HttpClientResponse])))();
   let X509CertificateTobool$ = () => (X509CertificateTobool$ = dart.constFn(dart.definiteFunctionType(core.bool, [io.X509Certificate])))();
   let _HttpClientConnectionTo_ConnectionInfo = () => (_HttpClientConnectionTo_ConnectionInfo = dart.constFn(dart.definiteFunctionType(io._ConnectionInfo, [io._HttpClientConnection])))();
+  let dynamicToFutureOrOf_ConnectionInfo = () => (dynamicToFutureOrOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOrOf_ConnectionInfo(), [dart.dynamic])))();
   let _ConnectionTargetTobool = () => (_ConnectionTargetTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io._ConnectionTarget])))();
   let _ConnectionInfoTo_HttpClientRequest = () => (_ConnectionInfoTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._ConnectionInfo])))();
-  let _ConnectionInfoTodynamic = () => (_ConnectionInfoTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._ConnectionInfo])))();
+  let _ConnectionInfoToFutureOrOf_HttpClientRequest = () => (_ConnectionInfoToFutureOrOf_HttpClientRequest = dart.constFn(dart.definiteFunctionType(FutureOrOf_HttpClientRequest(), [io._ConnectionInfo])))();
   let _HttpClientRequestTo_HttpClientRequest = () => (_HttpClientRequestTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._HttpClientRequest])))();
   let VoidTo_ConnectionTarget = () => (VoidTo_ConnectionTarget = dart.constFn(dart.definiteFunctionType(io._ConnectionTarget, [])))();
   let dynamicToFutureOf_ConnectionInfo = () => (dynamicToFutureOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOf_ConnectionInfo(), [dart.dynamic])))();
@@ -863,9 +886,9 @@
   let RawSecureSocketToSecureSocket = () => (RawSecureSocketToSecureSocket = dart.constFn(dart.definiteFunctionType(io.SecureSocket, [io.RawSecureSocket])))();
   let dynamicToFutureOfRawSecureSocket = () => (dynamicToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [dart.dynamic])))();
   let RawServerSocketToRawSecureServerSocket = () => (RawServerSocketToRawSecureServerSocket = dart.constFn(dart.definiteFunctionType(io.RawSecureServerSocket, [io.RawServerSocket])))();
-  let RawSecureSocketTodynamic = () => (RawSecureSocketTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RawSecureSocket])))();
+  let RawSecureSocketToFutureOr = () => (RawSecureSocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RawSecureSocket])))();
   let RawSocketToFutureOfRawSecureSocket = () => (RawSocketToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [io.RawSocket])))();
-  let _FilterStatusTodynamic = () => (_FilterStatusTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._FilterStatus])))();
+  let _FilterStatusToFutureOr = () => (_FilterStatusToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._FilterStatus])))();
   let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.int, [core.int])))();
   let dynamicTo_FilterStatus = () => (dynamicTo_FilterStatus = dart.constFn(dart.definiteFunctionType(io._FilterStatus, [dart.dynamic])))();
   let ListOfintAndStringTovoid = () => (ListOfintAndStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint(), core.String])))();
@@ -877,6 +900,7 @@
   let StringToFuture = () => (StringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [core.String])))();
   let EventSinkOfListOfintTo_WebSocketOutgoingTransformer = () => (EventSinkOfListOfintTo_WebSocketOutgoingTransformer = dart.constFn(dart.definiteFunctionType(io._WebSocketOutgoingTransformer, [EventSinkOfListOfint()])))();
   let dynamicTo_WebSocketImpl = () => (dynamicTo_WebSocketImpl = dart.constFn(dart.definiteFunctionType(io._WebSocketImpl, [dart.dynamic])))();
+  let SocketToFutureOr = () => (SocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.Socket])))();
   let HttpClientResponseToFutureOfWebSocket = () => (HttpClientResponseToFutureOfWebSocket = dart.constFn(dart.definiteFunctionType(FutureOfWebSocket(), [io.HttpClientResponse])))();
   let HttpClientRequestToFutureOfHttpClientResponse = () => (HttpClientRequestToFutureOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOfHttpClientResponse(), [io.HttpClientRequest])))();
   let dynamicToMap = () => (dynamicToMap = dart.constFn(dart.definiteFunctionType(core.Map, [dart.dynamic])))();
@@ -899,7 +923,7 @@
   let EventTovoid$ = () => (EventTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [html$.Event])))();
   let RequestToFutureOfT = () => (RequestToFutureOfT = dart.constFn(dart.definiteFunctionType(T => [async.Future$(T), [indexed_db.Request]])))();
   let dynamicToTo = () => (dynamicToTo = dart.constFn(dart.definiteFunctionType(To => [To, [dart.dynamic]])))();
-  let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
+  let EventToFutureOr = () => (EventToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [html$.Event])))();
   let NodeTobool$ = () => (NodeTobool$ = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Node])))();
   let MapOfString$dynamicTobool = () => (MapOfString$dynamicTobool = dart.constFn(dart.definiteFunctionType(core.bool, [MapOfString$dynamic()])))();
   let UriAndListOfStringAnddynamicToFutureOfIsolate = () => (UriAndListOfStringAnddynamicToFutureOfIsolate = dart.constFn(dart.definiteFunctionType(FutureOfIsolate(), [core.Uri, ListOfString(), dart.dynamic])))();
@@ -933,6 +957,7 @@
   let SetOfStringTobool = () => (SetOfStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [SetOfString()])))();
   let SetOfStringTovoid = () => (SetOfStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [SetOfString()])))();
   let EventAndStringTobool = () => (EventAndStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Event, core.String])))();
+  let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
   let KeyEventTobool = () => (KeyEventTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.KeyEvent])))();
   let NodeValidatorTobool = () => (NodeValidatorTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.NodeValidator])))();
   let NodeAndNodeToint = () => (NodeAndNodeToint = dart.constFn(dart.definiteFunctionType(core.int, [html$.Node, html$.Node])))();
@@ -972,6 +997,27 @@
           dart.copyProperties(s, m[dart._methodSig]);
         }
         return s;
+      },
+      fields: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._fieldSig]);
+        }
+        return s;
+      },
+      getters: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._getterSig]);
+        }
+        return s;
+      },
+      setters: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._setterSig]);
+        }
+        return s;
       }
     });
     Mixin[dart._mixins] = mixins;
@@ -1074,15 +1120,24 @@
   dart.getGenericTypeCtor = function(value) {
     return value[dart._genericTypeCtor];
   };
-  dart.getMethodType = function(obj, name) {
-    let type = obj == null ? core.Object : obj.__proto__.constructor;
-    return dart.getMethodTypeFromType(type, name);
+  dart.getType = function(obj) {
+    return obj == null ? core.Object : obj.__proto__.constructor;
   };
-  dart.getMethodTypeFromType = function(type, name) {
+  dart.getMethodType = function(type, name) {
     let sigObj = type[dart._methodSig];
     if (sigObj === void 0) return void 0;
     return sigObj[name];
   };
+  dart.getFieldType = function(type, name) {
+    let sigObj = type[dart._fieldSig];
+    if (sigObj === void 0) return void 0;
+    return sigObj[name];
+  };
+  dart.getSetterType = function(type, name) {
+    let sigObj = type[dart._setterSig];
+    if (sigObj === void 0) return void 0;
+    return sigObj[name];
+  };
   dart.classGetConstructorType = function(cls, name) {
     if (!name) name = 'new';
     if (cls === void 0) return void 0;
@@ -1094,7 +1149,7 @@
   dart.bind = function(obj, name, f) {
     if (f === void 0) f = obj[name];
     f = f.bind(obj);
-    let sig = dart.getMethodType(obj, name);
+    let sig = dart.getMethodType(dart.getType(obj), name);
     dart.assert(sig);
     dart.tag(f, sig);
     return f;
@@ -1108,7 +1163,8 @@
   dart._setInstanceSignature = function(f, sigF, kind) {
     dart.defineMemoizedGetter(f, kind, () => {
       let sigObj = sigF();
-      sigObj.__proto__ = f.__proto__[kind];
+      let proto = f.__proto__;
+      sigObj.__proto__ = kind in proto ? proto[kind] : null;
       return sigObj;
     });
   };
@@ -1169,8 +1225,22 @@
     dart._setStaticSetterSignature(f, staticSetters);
     dart._setStaticTypes(f, names);
   };
-  dart.hasMethod = function(obj, name) {
-    return dart.getMethodType(obj, name) !== void 0;
+  dart._hasSigEntry = function(type, sigF, name) {
+    let sigObj = type[sigF];
+    if (sigObj === void 0) return false;
+    return name in sigObj;
+  };
+  dart.hasMethod = function(type, name) {
+    return dart._hasSigEntry(type, dart._methodSig, name);
+  };
+  dart.hasGetter = function(type, name) {
+    return dart._hasSigEntry(type, dart._getterSig, name);
+  };
+  dart.hasSetter = function(type, name) {
+    return dart._hasSigEntry(type, dart._setterSig, name);
+  };
+  dart.hasField = function(type, name) {
+    return dart._hasSigEntry(type, dart._fieldSig, name);
   };
   dart.defineNamedConstructor = function(clazz, name) {
     let proto = clazz.prototype;
@@ -1231,9 +1301,15 @@
     if (!jsProto) return;
     jsProto[dart._extensionType] = dartExtType;
     dart._installProperties(jsProto, extProto);
-    let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, dart._methodSig).get;
-    dart.assert(originalSigFn);
-    dart.defineMemoizedGetter(jsType, dart._methodSig, originalSigFn);
+    function updateSig(sigF) {
+      let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, sigF).get;
+      dart.assert(originalSigFn);
+      dart.defineMemoizedGetter(jsType, sigF, originalSigFn);
+    }
+    updateSig(dart._methodSig);
+    updateSig(dart._fieldSig);
+    updateSig(dart._getterSig);
+    updateSig(dart._setterSig);
   };
   dart.defineExtensionMembers = function(type, methodNames) {
     let proto = type.prototype;
@@ -1241,14 +1317,23 @@
       let method = dart.getOwnPropertyDescriptor(proto, name);
       dart.defineProperty(proto, dart.getExtensionSymbol(name), method);
     }
-    let originalSigFn = dart.getOwnPropertyDescriptor(type, dart._methodSig).get;
-    dart.defineMemoizedGetter(type, dart._methodSig, function() {
-      let sig = originalSigFn();
-      for (let name of methodNames) {
-        sig[dart.getExtensionSymbol(name)] = sig[name];
-      }
-      return sig;
-    });
+    function upgradeSig(sigF) {
+      let originalSigFn = dart.getOwnPropertyDescriptor(type, sigF).get;
+      dart.defineMemoizedGetter(type, sigF, function() {
+        let sig = originalSigFn();
+        let propertyNames = Object.getOwnPropertyNames(sig);
+        for (let name of methodNames) {
+          if (name in sig) {
+            sig[dart.getExtensionSymbol(name)] = sig[name];
+          }
+        }
+        return sig;
+      });
+    }
+    upgradeSig(dart._methodSig);
+    upgradeSig(dart._fieldSig);
+    upgradeSig(dart._getterSig);
+    upgradeSig(dart._setterSig);
   };
   dart.setType = function(obj, type) {
     obj.__proto__ = type.prototype;
@@ -1449,6 +1534,65 @@
       return dart._asInstanceOfLazyJSType(object, this);
     };
   };
+  dart._memoizeArray = function(map, arr, create) {
+    let len = arr.length;
+    map = dart._lookupNonTerminal(map, len);
+    for (var i = 0; i < len - 1; ++i) {
+      map = dart._lookupNonTerminal(map, arr[i]);
+    }
+    let result = map.get(arr[len - 1]);
+    if (result !== void 0) return result;
+    map.set(arr[len - 1], result = create());
+    return result;
+  };
+  dart._normalizeParameter = function(a) {
+    if (a instanceof Array) {
+      let result = [];
+      result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
+      result.push(a.slice(1));
+      return result;
+    }
+    return a == dart.dynamic ? dart.bottom : a;
+  };
+  dart._canonicalizeArray = function(definite, array, map) {
+    let arr = definite ? array : array.map(dart._normalizeParameter);
+    return dart._memoizeArray(map, arr, () => arr);
+  };
+  dart._canonicalizeNamed = function(definite, named, map) {
+    let key = [];
+    let names = dart.getOwnPropertyNames(named);
+    let r = {};
+    for (var i = 0; i < names.length; ++i) {
+      let name = names[i];
+      let type = named[name];
+      if (!definite) r[name] = type = dart._normalizeParameter(type);
+      key.push(name);
+      key.push(type);
+    }
+    if (!definite) named = r;
+    return dart._memoizeArray(map, key, () => named);
+  };
+  dart._lookupNonTerminal = function(map, key) {
+    let result = map.get(key);
+    if (result !== void 0) return result;
+    map.set(key, result = new Map());
+    return result;
+  };
+  dart._createSmall = function(count, definite, returnType, required) {
+    let map = dart._fnTypeSmallMap[count];
+    let args = definite ? required : required.map(dart._normalizeParameter);
+    for (var i = 0; i < count; ++i) {
+      map = dart._lookupNonTerminal(map, args[i]);
+    }
+    let result = map.get(returnType);
+    if (result !== void 0) return result;
+    result = new dart.FunctionType(returnType, args, [], {});
+    map.set(returnType, result);
+    return result;
+  };
+  dart.typedef = function(name, closure) {
+    return new dart.Typedef(name, closure);
+  };
   dart._functionType = function(definite, returnType, args, extra) {
     if (args === void 0 && extra === void 0) {
       const fnTypeParts = returnType;
@@ -1467,9 +1611,6 @@
   dart.definiteFunctionType = function(returnType, args, extra) {
     return dart._functionType(true, returnType, args, extra);
   };
-  dart.typedef = function(name, closure) {
-    return new dart.Typedef(name, closure);
-  };
   dart.typeName = function(type) {
     if (type === void 0) return "undefined type";
     if (type === null) return "null type";
@@ -1505,17 +1646,17 @@
   };
   dart.getImplicitFunctionType = function(type) {
     if (dart.test(dart.isFunctionType(type))) return type;
-    return dart.getMethodTypeFromType(type, 'call');
+    return dart.getMethodType(type, 'call');
   };
   dart.isFunctionType = function(type) {
     return type instanceof dart.AbstractFunctionType || type === core.Function;
   };
-  dart.isLazyJSSubtype = function(t1, t2, covariant) {
+  dart.isLazyJSSubtype = function(t1, t2, isCovariant) {
     if (dart.equals(t1, t2)) return true;
     if (t1[_jsTypeCallback] == null || t2[_jsTypeCallback] == null) return true;
-    return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], covariant);
+    return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], isCovariant);
   };
-  dart.isFunctionSubtype = function(ft1, ft2, covariant) {
+  dart.isFunctionSubtype = function(ft1, ft2, isCovariant) {
     if (ft2 === core.Function) {
       return true;
     }
@@ -1527,26 +1668,26 @@
     let args1 = ft1.args;
     let args2 = ft2.args;
     if (args1.length > args2.length) {
-      return covariant ? false : null;
+      return isCovariant ? false : null;
     }
     for (let i = 0; i < args1.length; ++i) {
-      if (!dart._isSubtype(args2[i], args1[i], !covariant)) {
+      if (!dart._isSubtype(args2[i], args1[i], !isCovariant)) {
         return null;
       }
     }
     let optionals1 = ft1.optionals;
     let optionals2 = ft2.optionals;
     if (args1.length + optionals1.length < args2.length + optionals2.length) {
-      return covariant ? false : null;
+      return isCovariant ? false : null;
     }
     let j = 0;
     for (let i = args1.length; i < args2.length; ++i, ++j) {
-      if (!dart._isSubtype(args2[i], optionals1[j], !covariant)) {
+      if (!dart._isSubtype(args2[i], optionals1[j], !isCovariant)) {
         return null;
       }
     }
     for (let i = 0; i < optionals2.length; ++i, ++j) {
-      if (!dart._isSubtype(optionals2[i], optionals1[j], !covariant)) {
+      if (!dart._isSubtype(optionals2[i], optionals1[j], !isCovariant)) {
         return null;
       }
     }
@@ -1558,15 +1699,17 @@
       let n1 = named1[name];
       let n2 = named2[name];
       if (n1 === void 0) {
-        return covariant ? false : null;
+        return isCovariant ? false : null;
       }
-      if (!dart._isSubtype(n2, n1, !covariant)) {
+      if (!dart._isSubtype(n2, n1, !isCovariant)) {
         return null;
       }
     }
     if (ret2 === dart.void) return true;
-    if (ret1 === dart.void) return ret2 === dart.dynamic;
-    if (!dart._isSubtype(ret1, ret2, covariant)) return null;
+    if (ret1 === dart.void) {
+      return ret2 === dart.dynamic || ret2 === async.FutureOr;
+    }
+    if (!dart._isSubtype(ret1, ret2, isCovariant)) return null;
     return true;
   };
   dart._subtypeMemo = function(f) {
@@ -1589,9 +1732,12 @@
     return type == dart.bottom;
   };
   dart._isTop = function(type) {
+    if (dart.getGenericClass(type) === dart.getGenericClass(async.FutureOr)) {
+      return dart._isTop(dart.getGenericArgs(type)[0]);
+    }
     return type == core.Object || type == dart.dynamic;
   };
-  dart._isSubtype = function(t1, t2, covariant) {
+  dart._isSubtype = function(t1, t2, isCovariant) {
     if (t1 === t2) return true;
     if (dart._isTop(t2) || dart._isBottom(t1)) {
       return true;
@@ -1602,20 +1748,20 @@
       return false;
     }
     if (!(t1 instanceof dart.AbstractFunctionType) && !(t2 instanceof dart.AbstractFunctionType)) {
-      let result = dart.isClassSubType(t1, t2, covariant);
+      let result = dart.isClassSubType(t1, t2, isCovariant);
       if (result === true || result === null) return result;
     }
     t1 = dart.getImplicitFunctionType(t1);
     if (!t1) return false;
     if (dart.isFunctionType(t1) && dart.isFunctionType(t2)) {
-      return dart.isFunctionSubtype(t1, t2, covariant);
+      return dart.isFunctionSubtype(t1, t2, isCovariant);
     }
     if (t1 instanceof dart.LazyJSType && t2 instanceof dart.LazyJSType) {
-      return dart.isLazyJSSubtype(t1, t2, covariant);
+      return dart.isLazyJSSubtype(t1, t2, isCovariant);
     }
     return false;
   };
-  dart.isClassSubType = function(t1, t2, covariant) {
+  dart.isClassSubType = function(t1, t2, isCovariant) {
     if (t1 == t2) return true;
     if (t1 == core.Object) return false;
     if (t1 == null) return t2 == core.Object || t2 == dart.dynamic;
@@ -1633,16 +1779,25 @@
       }
       dart.assert(length == typeArguments2.length);
       for (let i = 0; i < length; ++i) {
-        let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], covariant);
+        let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], isCovariant);
         if (!result) {
           return result;
         }
       }
       return true;
     }
+    if (raw1 === dart.getGenericClass(async.FutureOr)) {
+      let t1TypeArg = dart.getGenericArgs(t1)[0];
+      let t1Future = dart.getGenericClass(async.Future)(t1TypeArg);
+      return dart.isSubtype(t1Future, t2) && dart.isSubtype(t1TypeArg, t2);
+    } else if (raw2 === dart.getGenericClass(async.FutureOr)) {
+      let t2TypeArg = dart.getGenericArgs(t2)[0];
+      let t2Future = dart.getGenericClass(async.Future)(t2TypeArg);
+      return dart.isSubtype(t1, t2Future) || dart.isSubtype(t1, t2TypeArg);
+    }
     let indefinite = false;
     function definitive(t1, t2) {
-      let result = dart.isClassSubType(t1, t2, covariant);
+      let result = dart.isClassSubType(t1, t2, isCovariant);
       if (result == null) {
         indefinite = true;
         return false;
@@ -1751,7 +1906,7 @@
       }
       return future.then(dart.dynamic)(onValue, {onError: onError});
     }
-    return dart.getGenericClass(async.Future)(T).new(function() {
+    return dart.getGenericClass(async.Future)(T).microtask(function() {
       iter = gen.apply(null, args)[Symbol.iterator]();
       return onValue();
     });
@@ -1763,18 +1918,32 @@
     let f = dart._canonicalMember(obj, field);
     dart._trackCall(obj);
     if (f != null) {
-      if (dart.test(dart.hasMethod(obj, f))) return dart.bind(obj, f, void 0);
-      return obj[f];
+      let type = dart.getType(obj);
+      if (dart.test(dart.hasField(type, f)) || dart.test(dart.hasGetter(type, f))) return obj[f];
+      if (dart.test(dart.hasMethod(type, f))) return dart.bind(obj, f, void 0);
     }
-    return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [], {isGetter: true}));
+    return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [], {isGetter: true}));
   };
   dart.dput = function(obj, field, value) {
     let f = dart._canonicalMember(obj, field);
     dart._trackCall(obj);
     if (f != null) {
-      return obj[f] = value;
+      let objType = dart.getType(obj);
+      let setterType = dart.getSetterType(objType, f);
+      if (setterType != void 0) {
+        if (dart.test(dart.instanceOfOrNull(value, setterType.args[0]))) {
+          return obj[f] = value;
+        }
+      } else {
+        let fieldType = dart.getFieldType(objType, f);
+        if (fieldType != void 0) {
+          if (dart.test(dart.instanceOfOrNull(value, fieldType))) {
+            return obj[f] = value;
+          }
+        }
+      }
     }
-    return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [value], {isSetter: true}));
+    return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [value], {isSetter: true}));
   };
   dart._checkApply = function(type, actuals) {
     if (actuals.length < type.args.length) return false;
@@ -1805,8 +1974,36 @@
     }
     return true;
   };
+  dart._toSymbolName = function(symbol) {
+    let str = symbol.toString();
+    return str.substring(7, str.length - 1);
+  };
+  dart._toDisplayName = function(name) {
+    if (name[0] === '_') {
+      switch (name) {
+        case '_get':
+        {
+          return '[]';
+        }
+        case '_set':
+        {
+          return '[]=';
+        }
+        case '_negate':
+        {
+          return 'unary-';
+        }
+        case '_constructor':
+        case '_prototype':
+        {
+          return name.substring(1);
+        }
+      }
+    }
+    return name;
+  };
   dart._dartSymbol = function(name) {
-    return dart.const(core.Symbol.new(name.toString()));
+    return core.Symbol._check(typeof name === "symbol" ? dart.const(new _internal.Symbol.es6(dart._toSymbolName(name), name)) : dart.const(core.Symbol.new(dart._toDisplayName(name))));
   };
   dart.extractNamedArgs = function(args) {
     if (args.length > 0) {
@@ -1825,7 +2022,7 @@
     }
     if (!(f instanceof Function)) {
       if (f != null) {
-        ftype = dart.getMethodType(f, 'call');
+        ftype = dart.getMethodType(dart.getType(f), 'call');
         f = f.call;
       }
       if (!(f instanceof Function)) {
@@ -1930,16 +2127,17 @@
       }
     }
     let actualTypeName = dart.typeName(actual);
-    let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(core.String._check(actualTypeName), src), VoidTo_MethodStats()));
+    let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(actualTypeName, src), VoidTo_MethodStats()));
     o.count = dart.notNull(o.count) + 1;
   };
   dart._callMethod = function(obj, name, typeArgs, args, displayName) {
     let symbol = dart._canonicalMember(obj, name);
     if (symbol == null) {
-      return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(displayName), core.List._check(args), {isMethod: true}));
+      return dart.noSuchMethod(obj, new dart.InvocationImpl(displayName, core.List._check(args), {isMethod: true}));
     }
     let f = obj != null ? obj[symbol] : null;
-    let ftype = dart.getMethodType(obj, symbol);
+    let type = dart.getType(obj);
+    let ftype = dart.getMethodType(type, symbol);
     return dart._checkAndCall(f, ftype, obj, typeArgs, args, displayName);
   };
   dart.dsend = function(obj, method, ...args) {
@@ -2330,7 +2528,56 @@
   dart.copyProperties = function(to, from) {
     return dart.copyTheseProperties(to, from, dart.getOwnNamesAndSymbols(from));
   };
-  dart.global = typeof window == "undefined" ? global : window;
+  dart.global = (function() {
+    if (typeof NodeList !== "undefined") {
+      NodeList.prototype.get = function(i) {
+        return this[i];
+      };
+      NamedNodeMap.prototype.get = function(i) {
+        return this[i];
+      };
+      DOMTokenList.prototype.get = function(i) {
+        return this[i];
+      };
+      HTMLCollection.prototype.get = function(i) {
+        return this[i];
+      };
+      if (typeof PannerNode == "undefined") {
+        let audioContext;
+        if (typeof AudioContext == "undefined" && typeof webkitAudioContext != "undefined") {
+          audioContext = new webkitAudioContext();
+        } else {
+          audioContext = new AudioContext();
+          window.StereoPannerNode = audioContext.createStereoPanner().constructor;
+        }
+        window.PannerNode = audioContext.createPanner().constructor;
+      }
+      if (typeof AudioSourceNode == "undefined") {
+        window.AudioSourceNode = MediaElementAudioSourceNode.__proto__;
+      }
+      if (typeof FontFaceSet == "undefined") {
+        window.FontFaceSet = document.fonts.__proto__.constructor;
+      }
+      if (typeof MemoryInfo == "undefined") {
+        if (typeof window.performance.memory != "undefined") {
+          window.MemoryInfo = window.performance.memory.constructor;
+        }
+      }
+      if (typeof Geolocation == "undefined") {
+        navigator.geolocation.constructor;
+      }
+      if (typeof Animation == "undefined") {
+        let d = document.createElement('div');
+        if (typeof d.animate != "undefined") {
+          window.Animation = d.animate(d).constructor;
+        }
+      }
+      if (typeof SourceBufferList == "undefined") {
+        window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
+      }
+    }
+    return typeof window == "undefined" ? global : window;
+  })();
   dart.JsSymbol = Symbol;
   dart._mixins = Symbol("mixins");
   dart.implements = Symbol("implements");
@@ -2482,196 +2729,186 @@
       this[_wrappedType] = wrappedType;
     }
     toString() {
-      return core.String._check(dart.typeName(this[_wrappedType]));
+      return dart.typeName(this[_wrappedType]);
     }
   };
   dart.setSignature(dart.WrappedType, {
     constructors: () => ({new: dart.definiteFunctionType(dart.WrappedType, [dart.dynamic])}),
     fields: () => ({[_wrappedType]: dart.dynamic})
   });
+  const _stringValue = Symbol('_stringValue');
   dart.AbstractFunctionType = class AbstractFunctionType extends dart.TypeRep {
-    constructor() {
-      super();
-      this._stringValue = null;
+    new() {
+      this[_stringValue] = null;
+      super.new();
     }
     toString() {
       return this.name;
     }
     get name() {
-      if (this._stringValue) return this._stringValue;
+      if (this[_stringValue] != null) return this[_stringValue];
       let buffer = '(';
       for (let i = 0; i < this.args.length; ++i) {
         if (i > 0) {
-          buffer += ', ';
+          buffer = dart.notNull(buffer) + ', ';
         }
-        buffer += dart.typeName(this.args[i]);
+        buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.args[i]));
       }
       if (this.optionals.length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '[';
+        if (this.args.length > 0) {
+          buffer = dart.notNull(buffer) + ', ';
+        }
+        buffer = dart.notNull(buffer) + '[';
         for (let i = 0; i < this.optionals.length; ++i) {
           if (i > 0) {
-            buffer += ', ';
+            buffer = dart.notNull(buffer) + ', ';
           }
-          buffer += dart.typeName(this.optionals[i]);
+          buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.optionals[i]));
         }
-        buffer += ']';
+        buffer = dart.notNull(buffer) + ']';
       } else if (Object.keys(this.named).length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '{';
-        let names = dart.getOwnPropertyNames(this.named).sort();
+        if (this.args.length > 0) {
+          buffer = dart.notNull(buffer) + ', ';
+        }
+        buffer = dart.notNull(buffer) + '{';
+        let names = dart.getOwnPropertyNames(this.named);
+        names.sort();
         for (let i = 0; i < names.length; ++i) {
           if (i > 0) {
-            buffer += ', ';
+            buffer = dart.notNull(buffer) + ', ';
           }
-          buffer += names[i] + ': ' + dart.typeName(this.named[names[i]]);
+          let typeNameString = dart.typeName(this.named[names[i]]);
+          buffer = dart.notNull(buffer) + dart.str`${names[i]}: ${typeNameString}`;
         }
-        buffer += '}';
+        buffer = dart.notNull(buffer) + '}';
       }
-      buffer += ') -> ' + dart.typeName(this.returnType);
-      this._stringValue = buffer;
+      let returnTypeName = dart.typeName(this.returnType);
+      buffer = dart.notNull(buffer) + dart.str`) -> ${returnTypeName}`;
+      this[_stringValue] = buffer;
       return buffer;
     }
   };
+  dart.setSignature(dart.AbstractFunctionType, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.AbstractFunctionType, [])}),
+    fields: () => ({[_stringValue]: core.String})
+  });
   dart._fnTypeNamedArgMap = new Map();
   dart._fnTypeArrayArgMap = new Map();
   dart._fnTypeTypeMap = new Map();
   dart._fnTypeSmallMap = [new Map(), new Map(), new Map()];
+  const _process = Symbol('_process');
   dart.FunctionType = class FunctionType extends dart.AbstractFunctionType {
-    static _memoizeArray(map, arr, create) {
-      let len = arr.length;
-      map = FunctionType._lookupNonTerminal(map, len);
-      for (var i = 0; i < len - 1; ++i) {
-        map = FunctionType._lookupNonTerminal(map, arr[i]);
-      }
-      let result = map.get(arr[len - 1]);
-      if (result !== void 0) return result;
-      map.set(arr[len - 1], result = create());
-      return result;
-    }
-    static _normalizeParameter(a) {
-      if (a instanceof Array) {
-        let result = [];
-        result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
-        result.push(a.slice(1));
-        return result;
-      }
-      return a == dart.dynamic ? dart.bottom : a;
-    }
-    static _canonicalizeArray(definite, array, map) {
-      let arr = definite ? array : array.map(FunctionType._normalizeParameter);
-      return FunctionType._memoizeArray(map, arr, () => arr);
-    }
-    static _canonicalizeNamed(definite, named, map) {
-      let key = [];
-      let names = dart.getOwnPropertyNames(named);
-      let r = {};
-      for (var i = 0; i < names.length; ++i) {
-        let name = names[i];
-        let type = named[name];
-        if (!definite) r[name] = type = FunctionType._normalizeParameter(type);
-        key.push(name);
-        key.push(type);
-      }
-      if (!definite) named = r;
-      return FunctionType._memoizeArray(map, key, () => named);
-    }
-    static _lookupNonTerminal(map, key) {
-      let result = map.get(key);
-      if (result !== void 0) return result;
-      map.set(key, result = new Map());
-      return result;
-    }
-    static _createSmall(count, definite, returnType, required) {
-      let map = dart._fnTypeSmallMap[count];
-      let args = definite ? required : required.map(FunctionType._normalizeParameter);
-      for (var i = 0; i < count; ++i) {
-        map = FunctionType._lookupNonTerminal(map, args[i]);
-      }
-      let result = map.get(returnType);
-      if (result !== void 0) return result;
-      result = new FunctionType(returnType, args, [], {});
-      map.set(returnType, result);
-      return result;
-    }
     static create(definite, returnType, args, extra) {
       if (extra === void 0 && args.length < 3) {
-        return FunctionType._createSmall(args.length, definite, returnType, args);
+        return dart._createSmall(args.length, definite, returnType, args);
       }
-      args = FunctionType._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
-      let keys;
-      let create;
+      args = dart._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
+      let keys = null;
+      let create = null;
       if (extra === void 0) {
         keys = [returnType, args];
-        create = () => new FunctionType(returnType, args, [], {});
+        create = dart.fn(() => new dart.FunctionType(returnType, args, [], {}), VoidToFunctionType());
       } else if (extra instanceof Array) {
-        let optionals = FunctionType._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
+        let optionals = dart._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
         keys = [returnType, args, optionals];
-        create = () => new FunctionType(returnType, args, optionals, {});
+        create = dart.fn(() => new dart.FunctionType(returnType, args, optionals, {}), VoidToFunctionType());
       } else {
-        let named = FunctionType._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
+        let named = dart._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
         keys = [returnType, args, named];
-        create = () => new FunctionType(returnType, args, [], named);
+        create = dart.fn(() => new dart.FunctionType(returnType, args, [], named), VoidToFunctionType());
       }
-      return FunctionType._memoizeArray(dart._fnTypeTypeMap, keys, create);
+      return dart._memoizeArray(dart._fnTypeTypeMap, keys, create);
     }
-    constructor(returnType, args, optionals, named) {
-      super();
+    [_process](array, metadata) {
+      let result = [];
+      for (let i = 0; i < array.length; ++i) {
+        let arg = array[i];
+        if (arg instanceof Array) {
+          dart.dsend(metadata, 'add', arg.slice(1));
+          result[dartx.add](arg[0]);
+        } else {
+          metadata.push([]);
+          result.push(arg);
+        }
+      }
+      return result;
+    }
+    new(returnType, args, optionals, named) {
       this.returnType = returnType;
       this.args = args;
       this.optionals = optionals;
       this.named = named;
+      this.metadata = null;
+      super.new();
       this.metadata = [];
-      function process(array, metadata) {
-        var result = [];
-        for (var i = 0; i < array.length; ++i) {
-          var arg = array[i];
-          if (arg instanceof Array) {
-            metadata.push(arg.slice(1));
-            result.push(arg[0]);
-          } else {
-            metadata.push([]);
-            result.push(arg);
-          }
-        }
-        return result;
-      }
-      this.args = process(this.args, this.metadata);
-      this.optionals = process(this.optionals, this.metadata);
+      this.args = this[_process](this.args, this.metadata);
+      this.optionals = this[_process](this.optionals, this.metadata);
     }
   };
+  dart.setSignature(dart.FunctionType, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.FunctionType, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+    fields: () => ({
+      returnType: dart.dynamic,
+      args: dart.dynamic,
+      optionals: dart.dynamic,
+      named: dart.dynamic,
+      metadata: dart.dynamic
+    }),
+    methods: () => ({[_process]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])}),
+    statics: () => ({create: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+    names: ['create']
+  });
+  const _name = Symbol('_name');
+  const _closure = Symbol('_closure');
+  const _functionType = Symbol('_functionType');
   dart.Typedef = class Typedef extends dart.AbstractFunctionType {
-    constructor(name, closure) {
-      super();
-      this._name = name;
-      this._closure = closure;
-      this._functionType = null;
+    new(name, closure) {
+      this[_name] = name;
+      this[_closure] = closure;
+      this[_functionType] = null;
+      super.new();
     }
     get name() {
-      return this._name;
+      return core.String._check(this[_name]);
     }
     get functionType() {
-      if (!this._functionType) {
-        this._functionType = this._closure();
+      if (this[_functionType] == null) {
+        this[_functionType] = this[_closure]();
       }
-      return this._functionType;
+      return this[_functionType];
     }
     get returnType() {
       return this.functionType.returnType;
     }
     get args() {
-      return this.functionType.args;
+      return core.List._check(this.functionType.args);
     }
     get optionals() {
-      return this.functionType.optionals;
+      return core.List._check(this.functionType.optionals);
     }
     get named() {
       return this.functionType.named;
     }
     get metadata() {
-      return this.functionType.metadata;
+      return core.List._check(this.functionType.metadata);
     }
   };
+  dart.setSignature(dart.Typedef, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.Typedef, [dart.dynamic, dart.dynamic])}),
+    fields: () => ({
+      [_name]: dart.dynamic,
+      [_closure]: dart.dynamic,
+      [_functionType]: dart.AbstractFunctionType
+    }),
+    getters: () => ({
+      functionType: dart.definiteFunctionType(dart.AbstractFunctionType, []),
+      returnType: dart.definiteFunctionType(dart.dynamic, []),
+      args: dart.definiteFunctionType(core.List, []),
+      optionals: dart.definiteFunctionType(core.List, []),
+      named: dart.definiteFunctionType(dart.dynamic, []),
+      metadata: dart.definiteFunctionType(core.List, [])
+    })
+  });
   dart._typeFormalCount = Symbol("_typeFormalCount");
   dart.isSubtype = dart._subtypeMemo((t1, t2) => t1 === t2 || dart._isSubtype(t1, t2, true));
   dart._trapRuntimeErrors = true;
@@ -2807,7 +3044,7 @@
     }
   };
   dart.setSignature(dart.InvocationImpl, {
-    constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [core.String, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
+    constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [dart.dynamic, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
     fields: () => ({
       memberName: core.Symbol,
       positionalArguments: core.List,
@@ -2951,8 +3188,8 @@
   dart.lazyFn(_debugger.getObjectTypeName, () => dynamicToString());
   _debugger.getTypeName = function(type) {
     let name = dart.typeName(type);
-    if (dart.equals(name, 'JSArray<dynamic>') || dart.equals(name, 'JSObject<Array>')) return 'List<dynamic>';
-    return core.String._check(name);
+    if (name == 'JSArray<dynamic>' || name == 'JSObject<Array>') return 'List<dynamic>';
+    return name;
   };
   dart.lazyFn(_debugger.getTypeName, () => TypeToString());
   _debugger._getType = function(object) {
@@ -3500,7 +3737,7 @@
       return true;
     }
     preview(object) {
-      return core.String._check(dart.typeName(dart.getReifiedType(object)));
+      return dart.typeName(dart.getReifiedType(object));
     }
     children(object) {
       return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'signature', value: this.preview(object)}), new _debugger.NameValuePair({name: 'JavaScript Function', value: object, config: _debugger.JsonMLConfig.skipDart})]);
@@ -7211,30 +7448,8 @@
     ListIterable[dart.implements] = () => [_internal.EfficientLength];
     dart.setSignature(ListIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.ListIterable$(E), [])}),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
-      methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        every: dart.definiteFunctionType(core.bool, [ETobool()]),
-        any: dart.definiteFunctionType(core.bool, [ETobool()]),
-        firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        singleWhere: dart.definiteFunctionType(E, [ETobool()]),
-        where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-        reduce: dart.definiteFunctionType(E, [dynamicAndEToE()]),
-        fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+      methods: () => ({reduce: dart.definiteFunctionType(E, [dynamicAndEToE()])})
     });
     dart.defineExtensionMembers(ListIterable, [
       'forEach',
@@ -7360,12 +7575,6 @@
       getters: () => ({
         [_endIndex]: dart.definiteFunctionType(core.int, []),
         [_startIndex]: dart.definiteFunctionType(core.int, [])
-      }),
-      methods: () => ({
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool})
       })
     });
     dart.defineExtensionMembers(SubListIterable, [
@@ -7480,13 +7689,7 @@
         [_iterable$]: IterableOfS(),
         [_f]: _TransformationOfS$T()
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(T), []),
-        first: dart.definiteFunctionType(T, []),
-        last: dart.definiteFunctionType(T, []),
-        single: dart.definiteFunctionType(T, [])
-      }),
-      methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(T), [])})
     });
     dart.defineExtensionMembers(MappedIterable, [
       'elementAt',
@@ -7579,8 +7782,7 @@
       fields: () => ({
         [_source]: IterableOfS(),
         [_f]: _TransformationOfS$T()
-      }),
-      methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+      })
     });
     dart.defineExtensionMembers(MappedListIterable, ['elementAt', 'length']);
     return MappedListIterable;
@@ -7929,8 +8131,7 @@
         [_iterable$]: IterableOfE(),
         [_skipCount]: core.int
       }),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({skip: dart.definiteFunctionType(core.Iterable$(E), [core.int])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(SkipIterable, ['skip', 'iterator']);
     return SkipIterable;
@@ -8156,31 +8357,8 @@
     EmptyIterable[dart.implements] = () => [_internal.EfficientLength];
     dart.setSignature(EmptyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.EmptyIterable$(E), [])}),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
-      methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        every: dart.definiteFunctionType(core.bool, [ETobool()]),
-        any: dart.definiteFunctionType(core.bool, [ETobool()]),
-        firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-        reduce: dart.definiteFunctionType(E, [EAndEToE()]),
-        fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+      methods: () => ({singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()})})
     });
     dart.defineExtensionMembers(EmptyIterable, [
       'forEach',
@@ -8379,8 +8557,7 @@
   dart.addSimpleTypeTests(_internal._ListIndicesIterable);
   dart.setSignature(_internal._ListIndicesIterable, {
     constructors: () => ({new: dart.definiteFunctionType(_internal._ListIndicesIterable, [core.List])}),
-    fields: () => ({[_backedList]: core.List}),
-    methods: () => ({elementAt: dart.definiteFunctionType(core.int, [core.int])})
+    fields: () => ({[_backedList]: core.List})
   });
   dart.defineExtensionMembers(_internal._ListIndicesIterable, ['elementAt', 'length']);
   const _values = Symbol('_values');
@@ -8509,8 +8686,7 @@
     }
     dart.setSignature(ReversedListIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.ReversedListIterable$(E), [IterableOfE()])}),
-      fields: () => ({[_source]: IterableOfE()}),
-      methods: () => ({elementAt: dart.definiteFunctionType(E, [core.int])})
+      fields: () => ({[_source]: IterableOfE()})
     });
     dart.defineExtensionMembers(ReversedListIterable, ['elementAt', 'length']);
     return ReversedListIterable;
@@ -8891,41 +9067,41 @@
     names: ['sort', 'sortRange', '_doSort', '_insertionSort', '_dualPivotQuicksort']
   });
   _internal.Sort._INSERTION_SORT_THRESHOLD = 32;
-  const _name = Symbol('_name');
+  const _name$ = Symbol('_name');
   const _nativeSymbol = Symbol('_nativeSymbol');
   _internal.Symbol = class Symbol extends core.Object {
     new(name) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = null;
     }
     es6(name, nativeSymbol) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = nativeSymbol;
     }
     unvalidated(name) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = null;
     }
     validated(name) {
-      this[_name] = _internal.Symbol.validatePublicSymbol(name);
+      this[_name$] = _internal.Symbol.validatePublicSymbol(name);
       this[_nativeSymbol] = null;
     }
     ['=='](other) {
-      return _internal.Symbol.is(other) && this[_name] == other[_name] && dart.equals(this[_nativeSymbol], other[_nativeSymbol]);
+      return _internal.Symbol.is(other) && this[_name$] == other[_name$] && dart.equals(this[_nativeSymbol], other[_nativeSymbol]);
     }
     get hashCode() {
       let hash = this._hashCode;
       if (hash != null) return hash;
       let arbitraryPrime = 664597;
-      hash = 536870911 & arbitraryPrime * dart.notNull(dart.hashCode(this[_name]));
+      hash = 536870911 & arbitraryPrime * dart.notNull(dart.hashCode(this[_name$]));
       this._hashCode = hash;
       return hash;
     }
     toString() {
-      return dart.str`Symbol("${this[_name]}")`;
+      return dart.str`Symbol("${this[_name$]}")`;
     }
     static getName(symbol) {
-      return symbol[_name];
+      return symbol[_name$];
     }
     static getNativeSymbol(symbol) {
       return symbol[_nativeSymbol];
@@ -8953,7 +9129,7 @@
       validated: dart.definiteFunctionType(_internal.Symbol, [core.String])
     }),
     fields: () => ({
-      [_name]: core.String,
+      [_name$]: core.String,
       [_nativeSymbol]: dart.dynamic
     }),
     methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])}),
@@ -9678,7 +9854,7 @@
       let replyPort = dart.dindex(msg, 'replyPort');
       _isolate_helper.IsolateNatives.spawn(core.String._check(dart.dindex(msg, 'functionName')), core.String._check(dart.dindex(msg, 'uri')), ListOfString()._check(dart.dindex(msg, 'args')), dart.dindex(msg, 'msg'), false, core.bool._check(dart.dindex(msg, 'isSpawnUri')), core.bool._check(dart.dindex(msg, 'startPaused'))).then(dart.dynamic)(dart.fn(msg => {
         dart.dsend(replyPort, 'send', msg);
-      }, ListTodynamic()), {onError: dart.fn(errorMessage => {
+      }, ListToFutureOr()), {onError: dart.fn(errorMessage => {
           dart.dsend(replyPort, 'send', JSArrayOfString().of([_isolate_helper._SPAWN_FAILED_SIGNAL, errorMessage]));
         }, StringTodynamic())});
     }
@@ -9737,7 +9913,7 @@
           dart.assert(dart.equals(dart.dindex(msg, 0), _isolate_helper._SPAWN_FAILED_SIGNAL));
           completer.completeError(dart.dindex(msg, 1));
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
       let signalReply = port.sendPort;
       if (dart.test(_isolate_helper._globalState.useWorkers) && !dart.test(isLight)) {
         _isolate_helper.IsolateNatives._startWorker(functionName, uri, args, message, isSpawnUri, startPaused, signalReply, dart.fn(message => completer.completeError(message), StringTovoid$()));
@@ -10076,6 +10252,7 @@
     let IterableOfT = () => (IterableOfT = dart.constFn(core.Iterable$(T)))();
     let intToT = () => (intToT = dart.constFn(dart.functionType(T, [core.int])))();
     let EventSinkOfTToEventSink = () => (EventSinkOfTToEventSink = dart.constFn(dart.functionType(async.EventSink, [EventSinkOfT()])))();
+    let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
     let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
     let VoidTo_IterablePendingEventsOfT = () => (VoidTo_IterablePendingEventsOfT = dart.constFn(dart.definiteFunctionType(_IterablePendingEventsOfT(), [])))();
     let TTovoid$ = () => (TTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [T])))();
@@ -10093,7 +10270,7 @@
         future.then(dart.dynamic)(dart.fn(value => {
           controller[_add$](value);
           controller[_closeUnchecked]();
-        }, TTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+        }, TToFutureOr()), {onError: dart.fn((error, stackTrace) => {
             controller[_addError](error, core.StackTrace._check(stackTrace));
             controller[_closeUnchecked]();
           }, dynamicAnddynamicTodynamic$())});
@@ -10215,7 +10392,7 @@
 
               if (async.Future.is(newValue)) {
                 subscription.pause();
-                newValue.then(dart.dynamic)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
+                newValue.then(dart.void)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
               } else {
                 controller.add(E.as(newValue));
               }
@@ -12677,12 +12854,6 @@
         return new Map();
       }
     }
-    dart.setSignature(Es6LinkedHashMap, {
-      methods: () => ({
-        [_getTableCell]: dart.definiteFunctionType(_js_helper.LinkedHashMapCell$(K, V), [dart.dynamic, dart.dynamic]),
-        [_getTableBucket]: dart.definiteFunctionType(core.List$(_js_helper.LinkedHashMapCell$(K, V)), [dart.dynamic, dart.dynamic])
-      })
-    });
     return Es6LinkedHashMap;
   });
   _js_helper.Es6LinkedHashMap = Es6LinkedHashMap();
@@ -12747,8 +12918,7 @@
     dart.setSignature(LinkedHashMapKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_js_helper.LinkedHashMapKeyIterable$(E), [JsLinkedHashMapOfE$dynamic()])}),
       fields: () => ({[_map]: JsLinkedHashMapOfE$dynamic()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(LinkedHashMapKeyIterable, [
       'contains',
@@ -13196,10 +13366,7 @@
       [_pattern]: core.String,
       [_index$0]: core.int
     }),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(core.Match), []),
-      first: dart.definiteFunctionType(core.Match, [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(core.Match), [])})
   });
   dart.defineExtensionMembers(_js_helper._StringAllMatchesIterable, ['iterator', 'first']);
   _js_helper._StringAllMatchesIterator = class _StringAllMatchesIterator extends core.Object {
@@ -13514,7 +13681,31 @@
     if (privateSymbol != null) {
       return privateSymbol;
     }
-    return _js_mirrors.getName(symbol);
+    let name = _js_mirrors.getName(symbol);
+    switch (name) {
+      case '[]':
+      {
+        name = '_get';
+        break;
+      }
+      case '[]=':
+      {
+        name = '_set';
+        break;
+      }
+      case 'unary-':
+      {
+        name = '_negate';
+        break;
+      }
+      case 'constructor':
+      case 'prototype':
+      {
+        name = dart.str`_${name}`;
+        break;
+      }
+    }
+    return name;
   };
   dart.lazyFn(_js_mirrors._getMember, () => SymbolTodynamic());
   _js_mirrors._getNameForESSymbol = function(member) {
@@ -14058,21 +14249,21 @@
     })
   });
   const _symbol = Symbol('_symbol');
-  const _name$ = Symbol('_name');
+  const _name$0 = Symbol('_name');
   _js_mirrors.JsVariableMirror = class JsVariableMirror extends _js_mirrors.JsMirror {
     get simpleName() {
       return this[_symbol];
     }
     _(symbol, t, annotations) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.type = _js_mirrors.reflectType(t);
       this.metadata = ListOfInstanceMirror().unmodifiable(annotations[dartx.map](mirrors.InstanceMirror)(dart.fn(a => _js_mirrors.reflect(a), dynamicToInstanceMirror())));
       this.isStatic = false;
       this.isFinal = false;
     }
     toString() {
-      return dart.str`VariableMirror on '${this[_name$]}'`;
+      return dart.str`VariableMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14099,7 +14290,7 @@
     constructors: () => ({_: dart.definiteFunctionType(_js_mirrors.JsVariableMirror, [core.Symbol, core.Type, core.List])}),
     fields: () => ({
       [_symbol]: core.Symbol,
-      [_name$]: core.String,
+      [_name$0]: core.String,
       type: mirrors.TypeMirror,
       metadata: ListOfInstanceMirror(),
       isStatic: core.bool,
@@ -14112,7 +14303,7 @@
       super._(member, t, annotations);
     }
     toString() {
-      return dart.str`ParameterMirror on '${this[_name$]}'`;
+      return dart.str`ParameterMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14157,17 +14348,17 @@
   let const$4;
   _js_mirrors.JsMethodMirror = class JsMethodMirror extends _js_mirrors.JsMirror {
     get isSetter() {
-      return this[_name$][dartx.endsWith]('=');
+      return this[_name$0][dartx.endsWith]('=');
     }
     get isPrivate() {
-      return this[_name$][dartx.startsWith]('_');
+      return this[_name$0][dartx.startsWith]('_');
     }
     get simpleName() {
       return this[_symbol];
     }
     _constructor(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = true;
       this.isStatic = false;
       this[_params] = null;
@@ -14177,7 +14368,7 @@
     }
     _instanceMethod(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = false;
       this.isStatic = false;
       this[_params] = null;
@@ -14187,7 +14378,7 @@
     }
     _staticMethod(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = false;
       this.isStatic = true;
       this[_params] = null;
@@ -14237,7 +14428,7 @@
       this[_params] = ListOfParameterMirror().unmodifiable(params);
     }
     toString() {
-      return dart.str`MethodMirror on '${this[_name$]}'`;
+      return dart.str`MethodMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14297,7 +14488,7 @@
     }),
     fields: () => ({
       [_symbol]: core.Symbol,
-      [_name$]: core.String,
+      [_name$0]: core.String,
       [_params]: ListOfParameterMirror(),
       [_metadata$]: ListOfInstanceMirror(),
       isConstructor: core.bool,
@@ -15144,8 +15335,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Float32x4, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Float32x4), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeFloat32x4List, [
@@ -15777,8 +15967,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Int32x4, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Int32x4), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeInt32x4List, [
@@ -15894,8 +16083,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Float64x2, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Float64x2), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeFloat64x2List, [
@@ -16260,8 +16448,7 @@
     getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
     methods: () => ({
       _get: dart.definiteFunctionType(core.double, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, core.num]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfdouble()], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, core.num])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfDouble, ['_get', '_set', 'setRange', 'length']);
@@ -16294,10 +16481,7 @@
   _native_typed_data.NativeTypedArrayOfInt[dart.implements] = () => [ListOfint()];
   dart.setSignature(_native_typed_data.NativeTypedArrayOfInt, {
     getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
-    methods: () => ({
-      _set: dart.definiteFunctionType(dart.void, [core.int, core.int]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfint()], [core.int])
-    })
+    methods: () => ({_set: dart.definiteFunctionType(dart.void, [core.int, core.int])})
   });
   dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfInt, ['_set', 'setRange', 'length']);
   dart.defineExtensionNames([
@@ -16341,7 +16525,6 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [ListOfdouble()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic, dart.dynamic]),
@@ -16391,7 +16574,6 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [ListOfdouble()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic, dart.dynamic]),
@@ -16446,10 +16628,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [_native_typed_data.NativeByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic, dart.dynamic]),
@@ -16504,10 +16683,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic, dart.dynamic]),
@@ -16562,10 +16738,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic, dart.dynamic]),
@@ -16620,10 +16793,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic, dart.dynamic]),
@@ -16678,10 +16848,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic, dart.dynamic]),
@@ -16743,10 +16910,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic, dart.dynamic]),
@@ -16809,10 +16973,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic, dart.dynamic]),
@@ -17626,10 +17787,7 @@
     dart.setSignature(_ControllerStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._ControllerStream$(T), [_StreamControllerLifecycleOfT()])}),
       fields: () => ({[_controller$]: _StreamControllerLifecycleOfT()}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        '==': dart.definiteFunctionType(core.bool, [core.Object])
-      })
+      methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])})
     });
     return _ControllerStream;
   });
@@ -17734,7 +17892,7 @@
       }
       onDone(handleDone) {
         if (handleDone == null) handleDone = async._nullDoneHandler;
-        this[_onDone] = this[_zone].registerCallback(dart.dynamic)(handleDone);
+        this[_onDone] = this[_zone].registerCallback(dart.void)(handleDone);
       }
       pause(resumeSignal) {
         if (resumeSignal === void 0) resumeSignal = null;
@@ -17887,7 +18045,7 @@
         dart.assert(!dart.test(this[_inCallback]));
         let wasInputPaused = this[_isInputPaused];
         this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-        this[_zone].runUnaryGuarded(dart.dynamic, T)(this[_onData], data);
+        this[_zone].runUnaryGuarded(dart.void, T)(this[_onData], data);
         this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
         this[_checkState](wasInputPaused);
       }
@@ -17928,7 +18086,7 @@
         const sendDone = (function() {
           if (!dart.test(this[_waitsForCancel])) return;
           this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_CANCELED | async._BufferingStreamSubscription._STATE_CLOSED | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-          this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+          this[_zone].runGuarded(dart.void)(this[_onDone]);
           this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
         }).bind(this);
         dart.fn(sendDone, VoidTovoid$());
@@ -18621,10 +18779,7 @@
       constructors: () => ({new: dart.definiteFunctionType(async._AsBroadcastStreamController$(T), [VoidTovoid(), VoidTovoid()])}),
       fields: () => ({[_pending]: _StreamImplEventsOfT()}),
       getters: () => ({[_hasPending]: dart.definiteFunctionType(core.bool, [])}),
-      methods: () => ({
-        [_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent]),
-        add: dart.definiteFunctionType(dart.void, [T])
-      })
+      methods: () => ({[_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent])})
     });
     return _AsBroadcastStreamController;
   });
@@ -18643,7 +18798,7 @@
       onDone(handleDone) {}
       pause(resumeSignal) {
         if (resumeSignal === void 0) resumeSignal = null;
-        if (resumeSignal != null) resumeSignal.then(dart.dynamic)(dart.bind(this, _resume));
+        if (resumeSignal != null) resumeSignal.then(dart.void)(dart.bind(this, _resume));
         this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1;
       }
       resume() {
@@ -18718,6 +18873,20 @@
     constructors: () => ({new: dart.definiteFunctionType(async.DeferredLoadException, [core.String])}),
     fields: () => ({[_s]: core.String})
   });
+  async.FutureOr$ = dart.generic(T => {
+    class FutureOr extends core.Object {
+      _() {
+        dart.throw(new core.UnsupportedError("FutureOr can't be instantiated"));
+      }
+    }
+    dart.addTypeTests(FutureOr);
+    dart.defineNamedConstructor(FutureOr, '_');
+    dart.setSignature(FutureOr, {
+      constructors: () => ({_: dart.definiteFunctionType(async.FutureOr$(T), [])})
+    });
+    return FutureOr;
+  });
+  async.FutureOr = FutureOr();
   const _completeWithValue = Symbol('_completeWithValue');
   let const$8;
   async.Future$ = dart.flattenFutures(dart.generic(T => {
@@ -18781,7 +18950,7 @@
         let result = new (_FutureOfT())();
         async.Timer.new(duration, dart.fn(() => {
           try {
-            result[_complete](computation == null ? null : computation());
+            result[_complete](dart.nullSafe(computation, _ => _()));
           } catch (e) {
             let s = dart.stackTrace(e);
             async._completeWithErrorCallback(result, e, s);
@@ -18823,31 +18992,43 @@
             }
           }
           dart.fn(handleError, dynamicAnddynamicTovoid$());
-          for (let future of futures) {
-            let pos = remaining++;
-            future.then(dart.dynamic)(dart.fn(value => {
-              remaining--;
-              if (values != null) {
-                values[dartx._set](pos, value);
-                if (remaining == 0) {
-                  result[_completeWithValue](values);
+          try {
+            for (let future of futures) {
+              let pos = remaining;
+              future.then(dart.dynamic)(dart.fn(value => {
+                remaining--;
+                if (values != null) {
+                  values[dartx._set](pos, value);
+                  if (remaining == 0) {
+                    result[_completeWithValue](values);
+                  }
+                } else {
+                  if (cleanUp != null && value != null) {
+                    async.Future.sync(dart.fn(() => {
+                      cleanUp(value);
+                    }, VoidTodynamic$()));
+                  }
+                  if (remaining == 0 && !dart.test(eagerError)) {
+                    result[_completeError](error, stackTrace);
+                  }
                 }
-              } else {
-                if (cleanUp != null && value != null) {
-                  async.Future.sync(dart.fn(() => {
-                    cleanUp(value);
-                  }, VoidTodynamic$()));
-                }
-                if (remaining == 0 && !dart.test(eagerError)) {
-                  result[_completeError](error, stackTrace);
-                }
-              }
-            }, dart.definiteFunctionType(dart.dynamic, [T])), {onError: handleError});
+              }, dart.definiteFunctionType(async.FutureOr, [T])), {onError: handleError});
+              remaining++;
+            }
+            if (remaining == 0) {
+              return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
+            }
+            values = core.List$(T).new(remaining);
+          } catch (e) {
+            let st = dart.stackTrace(e);
+            if (remaining == 0 || dart.test(eagerError)) {
+              return async.Future$(core.List$(T)).error(e, st);
+            } else {
+              error = e;
+              stackTrace = st;
+            }
           }
-          if (remaining == 0) {
-            return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
-          }
-          values = core.List$(T).new(remaining);
+
           return result;
         };
       }
@@ -18878,7 +19059,7 @@
         let nextIteration = null;
         nextIteration = async.Zone.current.bindUnaryCallback(dart.dynamic, core.bool)(dart.fn(keepGoing => {
           if (dart.test(keepGoing)) {
-            async.Future.sync(f).then(dart.dynamic)(dynamicTodynamic()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
+            async.Future.sync(f).then(dart.dynamic)(dynamicToFutureOr()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
           } else {
             doneSignal[_complete](null);
           }
@@ -19219,6 +19400,7 @@
   const _setChained = Symbol('_setChained');
   const _thenNoZoneRegistration = Symbol('_thenNoZoneRegistration');
   const _setPendingComplete = Symbol('_setPendingComplete');
+  const _clearPendingComplete = Symbol('_clearPendingComplete');
   const _error = Symbol('_error');
   const _chainSource = Symbol('_chainSource');
   const _setValue = Symbol('_setValue');
@@ -19234,7 +19416,7 @@
     let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
     let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))();
     let TTodynamic = () => (TTodynamic = dart.constFn(dart.functionType(dart.dynamic, [T])))();
-    let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
+    let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
     class _Future extends core.Object {
       new() {
         this[_zone] = async.Zone.current;
@@ -19283,7 +19465,7 @@
           let currentZone = async.Zone.current;
           let registered = null;
           if (!core.identical(currentZone, async._ROOT_ZONE)) {
-            f = currentZone.registerUnaryCallback(dart.dynamic, T)(f);
+            f = currentZone.registerUnaryCallback(async.FutureOr$(E), T)(f);
             if (onError != null) {
               onError = async._registerErrorHandler(T)(onError, currentZone);
             }
@@ -19323,6 +19505,10 @@
         dart.assert(this[_mayComplete]);
         this[_state] = async._Future._PENDING_COMPLETE;
       }
+      [_clearPendingComplete]() {
+        dart.assert(this[_isPendingComplete]);
+        this[_state] = async._Future._INCOMPLETE;
+      }
       get [_error]() {
         dart.assert(this[_hasError]);
         return async.AsyncError._check(this[_resultOrListeners]);
@@ -19423,8 +19609,9 @@
         try {
           source.then(dart.dynamic)(dart.fn(value => {
             dart.assert(target[_isPendingComplete]);
-            target[_completeWithValue](value);
-          }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+            target[_clearPendingComplete]();
+            target[_complete](value);
+          }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
               if (stackTrace === void 0) stackTrace = null;
               dart.assert(target[_isPendingComplete]);
               target[_completeError](error, core.StackTrace._check(stackTrace));
@@ -19674,7 +19861,7 @@
             timer.cancel();
             result[_completeWithValue](v);
           }
-        }, TTodynamic$()), {onError: dart.fn((e, s) => {
+        }, TToFutureOr()), {onError: dart.fn((e, s) => {
             if (dart.test(timer.isActive)) {
               timer.cancel();
               result[_completeError](e, core.StackTrace._check(s));
@@ -19710,12 +19897,13 @@
       }),
       methods: () => ({
         [_setChained]: dart.definiteFunctionType(dart.void, [async._Future]),
-        then: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic()], {onError: core.Function}]),
+        then: dart.definiteFunctionType(E => [async.Future$(E), [dart.functionType(async.FutureOr$(E), [T])], {onError: core.Function}]),
         [_thenNoZoneRegistration]: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic(), core.Function]]),
         catchError: dart.definiteFunctionType(async.Future$(T), [core.Function], {test: dynamicTobool()}),
         whenComplete: dart.definiteFunctionType(async.Future$(T), [VoidTodynamic()]),
         asStream: dart.definiteFunctionType(async.Stream$(T), []),
         [_setPendingComplete]: dart.definiteFunctionType(dart.void, []),
+        [_clearPendingComplete]: dart.definiteFunctionType(dart.void, []),
         [_setValue]: dart.definiteFunctionType(dart.void, [T]),
         [_setErrorObject]: dart.definiteFunctionType(dart.void, [async.AsyncError]),
         [_setError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace]),
@@ -19836,10 +20024,10 @@
     }
     let implementation = currentZone[_scheduleMicrotask];
     if (core.identical(async._ROOT_ZONE, implementation.zone) && dart.test(async._ROOT_ZONE.inSameErrorZone(currentZone))) {
-      async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.dynamic)(callback));
+      async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.void)(callback));
       return;
     }
-    async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+    async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
   };
   dart.fn(async.scheduleMicrotask, _AsyncCallbackTovoid());
   async._AsyncRun = class _AsyncRun extends core.Object {
@@ -19959,10 +20147,7 @@
     dart.setSignature(StreamView, {
       constructors: () => ({new: dart.definiteFunctionType(async.StreamView$(T), [StreamOfT()])}),
       fields: () => ({[_stream]: StreamOfT()}),
-      methods: () => ({
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-        listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-      })
+      methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
     });
     return StreamView;
   });
@@ -20667,8 +20852,7 @@
       fields: () => ({
         [_pending]: _EventGeneratorOfT(),
         [_isUsed]: core.bool
-      }),
-      methods: () => ({[_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool])})
+      })
     });
     return _GeneratedStreamImpl;
   });
@@ -21016,7 +21200,7 @@
         this[_state] = (dart.notNull(this[_state]) & ~async._DoneStreamSubscription._SCHEDULED) >>> 0;
         if (dart.test(this.isPaused)) return;
         this[_state] = (dart.notNull(this[_state]) | async._DoneStreamSubscription._DONE_SENT) >>> 0;
-        if (this[_onDone] != null) this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+        if (this[_onDone] != null) this[_zone].runGuarded(dart.void)(this[_onDone]);
       }
     }
     dart.addTypeTests(_DoneStreamSubscription);
@@ -21101,7 +21285,7 @@
       [_onCancel]() {
         let shutdown = this[_controller$] == null || dart.test(this[_controller$].isClosed);
         if (this[_onCancelHandler] != null) {
-          this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+          this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
         }
         if (shutdown) {
           if (this[_subscription] != null) {
@@ -21112,7 +21296,7 @@
       }
       [_onListen]() {
         if (this[_onListenHandler] != null) {
-          this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+          this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
         }
       }
       [_cancelSubscription]() {
@@ -21547,7 +21731,6 @@
         [_subscription]: StreamSubscriptionOfS()
       }),
       methods: () => ({
-        [_add$]: dart.definiteFunctionType(dart.void, [T]),
         [_handleData]: dart.definiteFunctionType(dart.void, [S]),
         [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace]),
         [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -21599,8 +21782,7 @@
     }
     dart.setSignature(_WhereStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._WhereStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _WhereStream;
   });
@@ -21637,8 +21819,7 @@
     }
     dart.setSignature(_MapStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._MapStream$(S, T), [StreamOfS(), _TransformationOfS$T()])}),
-      fields: () => ({[_transform]: _TransformationOfS$T()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+      fields: () => ({[_transform]: _TransformationOfS$T()})
     });
     return _MapStream;
   });
@@ -21670,8 +21851,7 @@
     }
     dart.setSignature(_ExpandStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._ExpandStream$(S, T), [StreamOfS(), _TransformationOfS$IterableOfT()])}),
-      fields: () => ({[_expand]: _TransformationOfS$IterableOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+      fields: () => ({[_expand]: _TransformationOfS$IterableOfT()})
     });
     return _ExpandStream;
   });
@@ -21760,11 +21940,7 @@
     }
     dart.setSignature(_TakeStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._TakeStream$(T), [StreamOfT(), core.int])}),
-      fields: () => ({[_count]: core.int}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_count]: core.int})
     });
     return _TakeStream;
   });
@@ -21838,8 +22014,7 @@
     }
     dart.setSignature(_TakeWhileStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._TakeWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _TakeWhileStream;
   });
@@ -21872,11 +22047,7 @@
     }
     dart.setSignature(_SkipStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._SkipStream$(T), [StreamOfT(), core.int])}),
-      fields: () => ({[_count]: core.int}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_count]: core.int})
     });
     return _SkipStream;
   });
@@ -21922,11 +22093,7 @@
     }
     dart.setSignature(_SkipWhileStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._SkipWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _SkipWhileStream;
   });
@@ -21980,7 +22147,6 @@
         [_equals]: _EqualityOfT(),
         [_previous$]: core.Object
       }),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])}),
       sfields: () => ({_SENTINEL: core.Object})
     });
     return _DistinctStream;
@@ -22121,7 +22287,6 @@
       }),
       getters: () => ({[_isSubscribed]: dart.definiteFunctionType(core.bool, [])}),
       methods: () => ({
-        [_add$]: dart.definiteFunctionType(dart.void, [T]),
         [_handleData]: dart.definiteFunctionType(dart.void, [S]),
         [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic], [dart.dynamic]),
         [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -22289,7 +22454,6 @@
     }
     dart.setSignature(_StreamHandlerTransformer, {
       constructors: () => ({new: dart.definiteFunctionType(async._StreamHandlerTransformer$(S, T), [], {handleData: SAndEventSinkOfTTovoid(), handleError: ObjectAndStackTraceAndEventSinkOfTTovoid(), handleDone: EventSinkOfTTovoid()})}),
-      methods: () => ({bind: dart.definiteFunctionType(async.Stream$(T), [StreamOfS()])}),
       statics: () => ({
         _defaultHandleData: dart.definiteFunctionType(dart.void, [dart.dynamic, async.EventSink]),
         _defaultHandleError: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace, async.EventSink]),
@@ -22368,7 +22532,7 @@
       if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
         return async.Zone.current.createTimer(duration, callback);
       }
-      return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+      return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
     }
     static periodic(duration, callback) {
       if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
@@ -23107,7 +23271,7 @@
   dart.fn(async._rootScheduleMicrotask, ZoneAndZoneDelegateAndZone__Tovoid());
   async._rootCreateTimer = function(self, parent, zone, duration, callback) {
     if (!core.identical(async._ROOT_ZONE, zone)) {
-      callback = zone.bindCallback(dart.dynamic)(callback);
+      callback = zone.bindCallback(dart.void)(callback);
     }
     return async.Timer._createTimer(duration, callback);
   };
@@ -23870,11 +24034,6 @@
         [_equals$]: _EqualityOfK(),
         [_hashCode]: _HasherOfK(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        remove: dart.definiteFunctionType(V, [core.Object])
       })
     });
     dart.defineExtensionMembers(_CustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -23917,8 +24076,7 @@
     dart.setSignature(_HashMapKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._HashMapKeyIterable$(E), [_HashMapOfE$dynamic()])}),
       fields: () => ({[_map$0]: _HashMapOfE$dynamic()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(_HashMapKeyIterable, [
       'contains',
@@ -24115,19 +24273,7 @@
         [_map$0]: dart.dynamic,
         [_modifications$]: core.int
       }),
-      getters: () => ({
-        keys: dart.definiteFunctionType(core.Iterable$(K), []),
-        values: dart.definiteFunctionType(core.Iterable$(V), [])
-      }),
-      methods: () => ({
-        addAll: dart.definiteFunctionType(dart.void, [MapOfK$V()]),
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        putIfAbsent: dart.definiteFunctionType(V, [K, VoidToV()]),
-        remove: dart.definiteFunctionType(V, [core.Object]),
-        forEach: dart.definiteFunctionType(dart.void, [KAndVTovoid()]),
-        [_modified$]: dart.definiteFunctionType(dart.void, [])
-      })
+      methods: () => ({[_modified$]: dart.definiteFunctionType(dart.void, [])})
     });
     dart.defineExtensionMembers(_Es6LinkedIdentityHashMap, [
       'containsKey',
@@ -24197,8 +24343,7 @@
         [_map$0]: dart.dynamic,
         [_isKeys]: core.bool
       }),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(_Es6MapIterable, [
       'contains',
@@ -24317,11 +24462,6 @@
         [_equals$]: _EqualityOfK(),
         [_hashCode]: _HasherOfK(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        remove: dart.definiteFunctionType(V, [core.Object])
       })
     });
     dart.defineExtensionMembers(_LinkedCustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -24693,11 +24833,7 @@
       }
     }
     dart.setSignature(_HashSetBase, {
-      methods: () => ({
-        difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      methods: () => ({toSet: dart.definiteFunctionType(core.Set$(E), [])})
     });
     dart.defineExtensionMembers(_HashSetBase, ['toSet']);
     return _HashSetBase;
@@ -24947,7 +25083,6 @@
         [_lookup]: dart.definiteFunctionType(E, [core.Object]),
         add: dart.definiteFunctionType(core.bool, [E]),
         [_add$0]: dart.definiteFunctionType(core.bool, [E]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
         [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
         [_computeElements]: dart.definiteFunctionType(core.List$(E), []),
@@ -24998,9 +25133,6 @@
         return -1;
       }
     }
-    dart.setSignature(_IdentityHashSet, {
-      methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-    });
     return _IdentityHashSet;
   });
   collection._IdentityHashSet = _IdentityHashSet();
@@ -25054,11 +25186,6 @@
         [_equality]: _EqualityOfE(),
         [_hasher]: _HasherOfE(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-        add: dart.definiteFunctionType(core.bool, [E]),
-        lookup: dart.definiteFunctionType(E, [core.Object])
       })
     });
     dart.defineExtensionMembers(_CustomHashSet, ['contains']);
@@ -25390,9 +25517,7 @@
       }),
       getters: () => ({
         iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        length: dart.definiteFunctionType(core.int, []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, [])
+        length: dart.definiteFunctionType(core.int, [])
       }),
       methods: () => ({
         [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
@@ -25401,13 +25526,10 @@
         [_contains]: dart.definiteFunctionType(core.bool, [core.Object]),
         lookup: dart.definiteFunctionType(E, [core.Object]),
         [_lookup]: dart.definiteFunctionType(E, [core.Object]),
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
         add: dart.definiteFunctionType(core.bool, [E]),
         [_add$0]: dart.definiteFunctionType(core.bool, [E]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
         [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
-        removeWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
-        retainWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
         [_filterWhere]: dart.definiteFunctionType(dart.void, [ETobool(), core.bool]),
         [_addHashTableEntry$]: dart.definiteFunctionType(core.bool, [dart.dynamic, E]),
         [_removeHashTableEntry$]: dart.definiteFunctionType(core.bool, [dart.dynamic, core.Object]),
@@ -25463,9 +25585,6 @@
         return -1;
       }
     }
-    dart.setSignature(_LinkedIdentityHashSet, {
-      methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-    });
     return _LinkedIdentityHashSet;
   });
   collection._LinkedIdentityHashSet = _LinkedIdentityHashSet();
@@ -25531,11 +25650,6 @@
         [_equality]: _EqualityOfE(),
         [_hasher]: _HasherOfE(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-        add: dart.definiteFunctionType(core.bool, [E]),
-        lookup: dart.definiteFunctionType(E, [core.Object])
       })
     });
     dart.defineExtensionMembers(_LinkedCustomHashSet, ['contains']);
@@ -26481,19 +26595,13 @@
         [_length$1]: core.int,
         [_first$]: E
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
         addFirst: dart.definiteFunctionType(dart.void, [E]),
         add: dart.definiteFunctionType(dart.void, [E]),
         addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [E]),
         clear: dart.definiteFunctionType(dart.void, []),
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
         [_insertBefore$]: dart.definiteFunctionType(dart.void, [E, E], {updateFirst: core.bool}),
         [_unlink$]: dart.definiteFunctionType(dart.void, [E])
       })
@@ -26785,12 +26893,7 @@
     dart.setSignature(_MapBaseValueIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._MapBaseValueIterable$(K, V), [MapOfK$V()])}),
       fields: () => ({[_map$0]: MapOfK$V()}),
-      getters: () => ({
-        first: dart.definiteFunctionType(V, []),
-        single: dart.definiteFunctionType(V, []),
-        last: dart.definiteFunctionType(V, []),
-        iterator: dart.definiteFunctionType(core.Iterator$(V), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(V), [])})
     });
     dart.defineExtensionMembers(_MapBaseValueIterable, [
       'length',
@@ -27463,12 +27566,7 @@
         [_sentinel]: _DoubleLinkedQueueSentinelOfE(),
         [_elementCount]: core.int
       }),
-      getters: () => ({
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, []),
-        iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])}),
       methods: () => ({
         addLast: dart.definiteFunctionType(dart.void, [E]),
         addFirst: dart.definiteFunctionType(dart.void, [E]),
@@ -27840,16 +27938,8 @@
         [_tail]: core.int,
         [_modificationCount]: core.int
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
         add: dart.definiteFunctionType(dart.void, [E]),
         addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
@@ -28550,8 +28640,7 @@
     dart.setSignature(_SplayTreeKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._SplayTreeKeyIterable$(K), [_SplayTreeOfK$_SplayTreeNodeOfK()])}),
       fields: () => ({[_tree]: _SplayTreeOfK$_SplayTreeNodeOfK()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])}),
-      methods: () => ({toSet: dart.definiteFunctionType(core.Set$(K), [])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])})
     });
     dart.defineExtensionMembers(_SplayTreeKeyIterable, ['toSet', 'length', 'isEmpty', 'iterator']);
     return _SplayTreeKeyIterable;
@@ -28821,24 +28910,14 @@
         [_comparator]: ComparatorOfE(),
         [_validKey]: collection._Predicate
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
         [_compare]: dart.definiteFunctionType(core.int, [E, E]),
         add: dart.definiteFunctionType(core.bool, [E]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         lookup: dart.definiteFunctionType(E, [core.Object]),
-        intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        union: dart.definiteFunctionType(core.Set$(E), [SetOfE()]),
         [_clone]: dart.definiteFunctionType(collection.SplayTreeSet$(E), []),
-        [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()]),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
+        [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()])
       })
     });
     dart.defineExtensionMembers(SplayTreeSet, [
@@ -28905,7 +28984,7 @@
   const _data = Symbol('_data');
   const _isUpgraded = Symbol('_isUpgraded');
   const _upgradedMap = Symbol('_upgradedMap');
-  const _process = Symbol('_process');
+  const _process$ = Symbol('_process');
   const _upgrade = Symbol('_upgrade');
   convert._JsonMap = class _JsonMap extends core.Object {
     new(original) {
@@ -28920,7 +28999,7 @@
         return null;
       } else {
         let result = convert._JsonMap._getProperty(this[_processed], core.String._check(key));
-        if (dart.test(convert._JsonMap._isUnprocessed(result))) result = this[_process](core.String._check(key));
+        if (dart.test(convert._JsonMap._isUnprocessed(result))) result = this[_process$](core.String._check(key));
         return result;
       }
     }
@@ -29048,7 +29127,7 @@
       dart.assert(this[_isUpgraded]);
       return result;
     }
-    [_process](key) {
+    [_process$](key) {
       if (!dart.test(convert._JsonMap._hasProperty(this[_original], key))) return null;
       let result = convert._convertJsonToDartLazy(convert._JsonMap._getProperty(this[_original], key));
       return convert._JsonMap._setProperty(this[_processed], key, result);
@@ -29101,7 +29180,7 @@
       forEach: dart.definiteFunctionType(dart.void, [dynamicAnddynamicTovoid()]),
       [_computeKeys$]: dart.definiteFunctionType(core.List$(core.String), []),
       [_upgrade]: dart.definiteFunctionType(core.Map, []),
-      [_process]: dart.definiteFunctionType(dart.dynamic, [core.String])
+      [_process$]: dart.definiteFunctionType(dart.dynamic, [core.String])
     }),
     statics: () => ({
       _hasProperty: dart.definiteFunctionType(core.bool, [dart.dynamic, core.String]),
@@ -29152,7 +29231,6 @@
   dart.setSignature(convert._JsonMapKeyIterable, {
     constructors: () => ({new: dart.definiteFunctionType(convert._JsonMapKeyIterable, [convert._JsonMap])}),
     fields: () => ({[_parent]: convert._JsonMap}),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator, [])}),
     methods: () => ({elementAt: dart.definiteFunctionType(core.String, [core.int])})
   });
   dart.defineExtensionMembers(convert._JsonMapKeyIterable, ['elementAt', 'contains', 'length', 'iterator']);
@@ -29577,8 +29655,7 @@
     fields: () => ({[_subsetMask]: core.int}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
     })
   });
   convert.AsciiEncoder = class AsciiEncoder extends convert._UnicodeSubsetEncoder {
@@ -29668,8 +29745,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-      [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()])
+      [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int])
     })
   });
   convert.AsciiDecoder = class AsciiDecoder extends convert._UnicodeSubsetDecoder {
@@ -29692,8 +29768,7 @@
     }
   };
   dart.setSignature(convert.AsciiDecoder, {
-    constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})}),
-    methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+    constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})})
   });
   const _utf8Sink = Symbol('_utf8Sink');
   let const$30;
@@ -30708,8 +30783,7 @@
       fields: () => ({[_codec]: CodecOfS$T()}),
       getters: () => ({
         encoder: dart.definiteFunctionType(convert.Converter$(T, S), []),
-        decoder: dart.definiteFunctionType(convert.Converter$(S, T), []),
-        inverted: dart.definiteFunctionType(convert.Codec$(S, T), [])
+        decoder: dart.definiteFunctionType(convert.Converter$(S, T), [])
       })
     });
     return _InvertedCodec;
@@ -30740,15 +30814,12 @@
         [_first$0]: ConverterOfS$M(),
         [_second]: ConverterOfM$T()
       }),
-      methods: () => ({
-        convert: dart.definiteFunctionType(T, [S]),
-        startChunkedConversion: dart.definiteFunctionType(core.Sink$(S), [SinkOfT()])
-      })
+      methods: () => ({convert: dart.definiteFunctionType(T, [S])})
     });
     return _FusedConverter;
   });
   convert._FusedConverter = _FusedConverter();
-  const _name$0 = Symbol('_name');
+  const _name$1 = Symbol('_name');
   let const$34;
   let const$35;
   let const$36;
@@ -30759,7 +30830,7 @@
   let const$41;
   convert.HtmlEscapeMode = class HtmlEscapeMode extends core.Object {
     _(name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) {
-      this[_name$0] = name;
+      this[_name$1] = name;
       this.escapeLtGt = escapeLtGt;
       this.escapeQuot = escapeQuot;
       this.escapeApos = escapeApos;
@@ -30775,10 +30846,10 @@
       this.escapeQuot = escapeQuot;
       this.escapeApos = escapeApos;
       this.escapeSlash = escapeSlash;
-      this[_name$0] = name;
+      this[_name$1] = name;
     }
     toString() {
-      return this[_name$0];
+      return this[_name$1];
     }
   };
   dart.defineNamedConstructor(convert.HtmlEscapeMode, '_');
@@ -30788,7 +30859,7 @@
       new: dart.definiteFunctionType(convert.HtmlEscapeMode, [], {name: core.String, escapeLtGt: core.bool, escapeQuot: core.bool, escapeApos: core.bool, escapeSlash: core.bool})
     }),
     fields: () => ({
-      [_name$0]: core.String,
+      [_name$1]: core.String,
       escapeLtGt: core.bool,
       escapeQuot: core.bool,
       escapeApos: core.bool,
@@ -31062,9 +31133,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [core.Object]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfObject()]),
-      fuse: dart.definiteFunctionType(T => [convert.Converter$(core.Object, T), [convert.Converter$(core.String, T)]])
+      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()])
     })
   });
   const _indent = Symbol('_indent');
@@ -31138,8 +31207,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.Object]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfObject()])
+      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()])
     }),
     sfields: () => ({DEFAULT_BUFFER_SIZE: core.int}),
     statics: () => ({_utf8Encode: dart.definiteFunctionType(core.List$(core.int), [core.String])}),
@@ -31246,8 +31314,7 @@
     fields: () => ({[_reviver]: convert._Reviver}),
     methods: () => ({
       convert: dart.definiteFunctionType(dart.dynamic, [core.String]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.Object), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()])
     })
   });
   convert._parseJson = function(source, reviver) {
@@ -31844,8 +31911,7 @@
     }
   };
   dart.setSignature(convert.Latin1Decoder, {
-    constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})}),
-    methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+    constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})})
   });
   const _addSliceToSink = Symbol('_addSliceToSink');
   convert._Latin1DecoderSink = class _Latin1DecoderSink extends convert.ByteConversionSinkBase {
@@ -32433,8 +32499,7 @@
     constructors: () => ({new: dart.definiteFunctionType(convert.Utf8Encoder, [])}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
     })
   });
   convert._Utf8Encoder = class _Utf8Encoder extends core.Object {
@@ -32679,9 +32744,7 @@
     fields: () => ({[_allowMalformed]: core.bool}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()]),
-      fuse: dart.definiteFunctionType(T => [convert.Converter$(core.List$(core.int), T), [convert.Converter$(core.String, T)]])
+      startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])
     }),
     statics: () => ({_convertIntercepted: dart.definiteFunctionType(core.String, [core.bool, ListOfint(), core.int, core.int])}),
     names: ['_convertIntercepted']
@@ -34198,10 +34261,6 @@
         [_generator$]: _GeneratorOfE()
       }),
       getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int])
-      }),
       statics: () => ({_id: dart.definiteFunctionType(core.int, [core.int])}),
       names: ['_id']
     });
@@ -34528,10 +34587,7 @@
   dart.setSignature(core.Runes, {
     constructors: () => ({new: dart.definiteFunctionType(core.Runes, [core.String])}),
     fields: () => ({string: core.String}),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.RuneIterator, []),
-      last: dart.definiteFunctionType(core.int, [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.RuneIterator, [])})
   });
   dart.defineExtensionMembers(core.Runes, ['iterator', 'last']);
   core._isLeadSurrogate = function(code) {
@@ -38562,8 +38618,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot resolve symbolic links", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfString()._check(response);
+      }, dynamicToFutureOrOfString()));
     }
     resolveSymbolicLinksSync() {
       let result = io.FileSystemEntity._resolveSymbolicLinks(this.path);
@@ -38588,8 +38644,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, dart.str`Error in FileSystemEntity.identical(${path1}, ${path2})`, ""));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfbool()._check(response);
+      }, dynamicToFutureOrOfbool()));
     }
     get isAbsolute() {
       if (dart.test(io.Platform.isWindows)) {
@@ -38684,8 +38740,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Error getting type", path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     static _throwIfError(result, msg, path) {
       if (path === void 0) path = null;
@@ -38880,7 +38936,7 @@
           } else {
             return this.create();
           }
-        }, boolTodynamic()));
+        }, boolToFutureOrOfDirectory()));
       } else {
         return io._IOService._dispatch(io._DIRECTORY_CREATE, JSArrayOfString().of([this.path])).then(io._Directory)(dart.fn(response => {
           if (dart.test(this[_isErrorResponse](response))) {
@@ -39101,7 +39157,7 @@
           this.error(response);
           this.close();
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
     }
     onResume() {
       if (!dart.test(this.nextRunning)) {
@@ -39166,7 +39222,7 @@
         } else {
           this.controller.addError(new io.FileSystemException("Internal error"));
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
     }
     [_cleanup]() {
       this.controller.close();
@@ -39308,6 +39364,9 @@
       }[this.index];
     }
   };
+  dart.setSignature(io.FileLock, {
+    fields: () => ({index: core.int})
+  });
   dart.defineEnumValues(io.FileLock, [
     'SHARED',
     'EXCLUSIVE'
@@ -39473,7 +39532,7 @@
         if (dart.test(this[_atEnd])) {
           this[_closeFile]();
         }
-      }, ListOfintTodynamic())).catchError(dart.fn((e, s) => {
+      }, ListOfintToFutureOr())).catchError(dart.fn((e, s) => {
         if (!dart.test(this[_unsubscribed])) {
           this[_controller$0].addError(e, core.StackTrace._check(s));
           this[_closeFile]();
@@ -39496,7 +39555,7 @@
       dart.fn(onReady, RandomAccessFileTovoid());
       const onOpenFile = (function(file) {
         if (dart.notNull(this[_position$0]) > 0) {
-          file.setPosition(this[_position$0]).then(dart.dynamic)(onReady, {onError: dart.fn((e, s) => {
+          file.setPosition(this[_position$0]).then(dart.void)(onReady, {onError: dart.fn((e, s) => {
               this[_controller$0].addError(e, core.StackTrace._check(s));
               this[_readInProgress] = false;
               this[_closeFile]();
@@ -39513,7 +39572,7 @@
       }).bind(this);
       dart.fn(openFailed, dynamicAnddynamicTovoid$());
       if (this[_path$] != null) {
-        io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.dynamic)(onOpenFile, {onError: openFailed});
+        io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.void)(onOpenFile, {onError: openFailed});
       } else {
         try {
           onOpenFile(io._File._openStdioSync(0));
@@ -39580,7 +39639,7 @@
         _subscription = stream.listen(dart.fn(d => {
           dart.dsend(_subscription, 'pause');
           try {
-            openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileTodynamic()), {onError: error});
+            openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileToFutureOr()), {onError: error});
           } catch (e) {
             let stackTrace = dart.stackTrace(e);
             error(e, stackTrace);
@@ -39589,7 +39648,7 @@
         }, ListOfintTovoid$()), {onDone: dart.fn(() => {
             completer.complete(this[_file]);
           }, VoidTovoid$()), onError: error, cancelOnError: true});
-      }, RandomAccessFileTodynamic())).catchError(dart.bind(completer, 'completeError'));
+      }, RandomAccessFileToFutureOr())).catchError(dart.bind(completer, 'completeError'));
       return completer.future;
     }
     close() {
@@ -39627,8 +39686,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot check existence", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfbool()._check(response);
+      }, dynamicToFutureOrOfbool()));
     }
     static _exists(path) {
       dart.throw(new core.UnsupportedError("File._exists"));
@@ -39752,8 +39811,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot retrieve length of file", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     static _lengthFromPath(path) {
       dart.throw(new core.UnsupportedError("File._lengthFromPath"));
@@ -39891,7 +39950,7 @@
       return this.open({mode: mode}).then(io.File)(dart.fn(file => file.writeFrom(bytes, 0, bytes[dartx.length]).then(dart.dynamic)(dart.fn(_ => {
         if (dart.test(flush)) return file.flush().then(io._File)(dart.fn(_ => this, RandomAccessFileTo_File()));
         return this;
-      }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileTodynamic()));
+      }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileToFutureOrOfFile()));
     }
     writeAsBytesSync(bytes, opts) {
       let mode = opts && 'mode' in opts ? opts.mode : io.FileMode.WRITE;
@@ -40052,8 +40111,8 @@
           dart.throw(io._exceptionFromResponse(response, "readByte failed", this.path));
         }
         this[_resourceInfo].addRead(1);
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     readByteSync() {
       this[_checkAvailable]();
@@ -40073,8 +40132,8 @@
           dart.throw(io._exceptionFromResponse(response, "read failed", this.path));
         }
         this[_resourceInfo].addRead(core.int._check(dart.dload(dart.dindex(response, 1), 'length')));
-        return dart.dindex(response, 1);
-      }, dynamicTodynamic$()));
+        return FutureOrOfListOfint()._check(dart.dindex(response, 1));
+      }, dynamicToFutureOrOfListOfint()));
     }
     readSync(bytes) {
       this[_checkAvailable]();
@@ -40107,8 +40166,8 @@
         let data = dart.dindex(response, 2);
         buffer[dartx.setRange](start, dart.asInt(dart.notNull(start) + dart.notNull(core.num._check(read))), IterableOfint()._check(data));
         this[_resourceInfo].addRead(core.int._check(read));
-        return read;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(read);
+      }, dynamicToFutureOrOfint()));
     }
     readIntoSync(buffer, start, end) {
       if (start === void 0) start = 0;
@@ -40221,8 +40280,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "position failed", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     positionSync() {
       this[_checkAvailable]();
@@ -40267,8 +40326,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "length failed", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     lengthSync() {
       this[_checkAvailable]();
@@ -43009,7 +43068,7 @@
         } else {
           return this;
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOrOfHttpClientResponse()));
     }
   };
   io._HttpClientResponse[dart.implements] = () => [io.HttpClientResponse];
@@ -43122,7 +43181,7 @@
         return this.done;
       }
       [_closeTarget]() {
-        this[_target$].close().then(dart.dynamic)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
+        this[_target$].close().then(dart.void)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
       }
       get done() {
         return this[_doneCompleter].future;
@@ -43156,7 +43215,7 @@
             } else {
               this[_closeTarget]();
             }
-          }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+          }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
               if (dart.test(this[_isBound])) {
                 this[_controllerCompleter].completeError(error, core.StackTrace._check(stackTrace));
                 this[_controllerCompleter] = null;
@@ -43344,8 +43403,7 @@
         contentLength: dart.definiteFunctionType(dart.void, [core.int]),
         persistentConnection: dart.definiteFunctionType(dart.void, [core.bool]),
         bufferOutput: dart.definiteFunctionType(dart.void, [core.bool])
-      }),
-      methods: () => ({add: dart.definiteFunctionType(dart.void, [ListOfint()])})
+      })
     });
     return _HttpOutboundMessage;
   });
@@ -43739,7 +43797,7 @@
     }
     get done() {
       if (this[_response] == null) {
-        this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => list[dartx._get](0), ListTodynamic()));
+        this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => FutureOrOfHttpClientResponse()._check(list[dartx._get](0)), ListToFutureOrOfHttpClientResponse()));
       }
       return this[_response];
     }
@@ -43780,7 +43838,7 @@
       } else {
         future = FutureOfHttpClientResponse().value(response);
       }
-      future.then(dart.dynamic)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
+      future.then(dart.void)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
     }
     [_onError$](error, stackTrace) {
       this[_responseCompleter].completeError(error, stackTrace);
@@ -44306,7 +44364,7 @@
         if (incoming.statusCode == 100) {
           incoming.drain(dart.dynamic)().then(dart.dynamic)(dart.fn(_ => {
             this[_subscription$].resume();
-          }, dynamicTodynamic$())).catchError(dart.fn((error, stackTrace) => {
+          }, dynamicToFutureOr$())).catchError(dart.fn((error, stackTrace) => {
             if (stackTrace === void 0) stackTrace = null;
             this[_nextResponseCompleter].completeError(new io.HttpException(core.String._check(dart.dload(error, 'message')), {uri: this[_currentUri]}), stackTrace);
             this[_nextResponseCompleter] = null;
@@ -44383,7 +44441,7 @@
             } else {
               this.destroy();
             }
-          }, dynamicTodynamic$()));
+          }, dynamicToFutureOr$()));
           if (proxyCreds != null && dart.equals(proxyCreds.scheme, io._AuthenticationScheme.DIGEST)) {
             let authInfo = incoming.headers._get("proxy-authentication-info");
             if (authInfo != null && authInfo[dartx.length] == 1) {
@@ -44401,7 +44459,7 @@
             }
           }
           request[_onIncoming](incoming);
-        }, _HttpIncomingTodynamic())).catchError(dart.fn(error => {
+        }, _HttpIncomingToFutureOr())).catchError(dart.fn(error => {
           dart.throw(new io.HttpException("Connection closed before data was received", {uri: uri}));
         }, dynamicTodynamic$()), {test: dart.fn(error => core.StateError.is(error), ObjectTobool())}).catchError(dart.fn((error, stackTrace) => {
           this.destroy();
@@ -44425,7 +44483,7 @@
     close() {
       this.closed = true;
       this[_httpClient][_connectionClosed](this);
-      this[_streamFuture].then(dart.dynamic)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
+      this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
     }
     createProxyTunnel(host, port, proxy, callback) {
       let request = this.send(core.Uri.new({host: core.String._check(host), port: core.int._check(port)}), core.int._check(port), "CONNECT", io._Proxy._check(proxy));
@@ -44584,7 +44642,7 @@
       if (client.maxConnectionsPerHost != null && dart.notNull(this[_active].length) + dart.notNull(this[_connecting]) >= dart.notNull(client.maxConnectionsPerHost)) {
         let completer = async.Completer.new();
         this[_pending$].add(dart.fn(() => {
-          this.connect(uriHost, uriPort, proxy, client).then(dart.dynamic)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
+          this.connect(uriHost, uriPort, proxy, client).then(dart.void)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
         }, VoidTodynamic$()));
         return FutureOf_ConnectionInfo()._check(completer.future);
       }
@@ -44610,7 +44668,7 @@
           this.addNewActive(connection);
           return new io._ConnectionInfo(connection, proxy);
         }
-      }, dynamicTodynamic$()), {onError: dart.fn(error => {
+      }, dynamicToFutureOrOf_ConnectionInfo()), {onError: dart.fn(error => {
           this[_connecting] = dart.notNull(this[_connecting]) - 1;
           this[_checkPending]();
           dart.throw(error);
@@ -44809,7 +44867,7 @@
           return this[_getConnection](uri.host, port, proxyConf, isSecure).then(io._HttpClientRequest)(send);
         }
         return send(info);
-      }, _ConnectionInfoTodynamic()));
+      }, _ConnectionInfoToFutureOrOf_HttpClientRequest()));
     }
     [_openUrlFromRequest](method, uri, previous) {
       let resolved = previous.uri.resolveUri(uri);
@@ -45093,7 +45151,7 @@
         this[_httpServer][_markActive](this);
         incoming.dataDone.then(dart.dynamic)(dart.fn(closing => {
           if (dart.test(closing)) this.destroy();
-        }, dynamicTodynamic$()));
+        }, dynamicToFutureOr$()));
         this[_subscription$].pause();
         this[_state$1] = io._HttpConnection._ACTIVE;
         let outgoing = new io._HttpOutgoing(io.Socket._check(this[_socket]));
@@ -45110,7 +45168,7 @@
           } else {
             this.destroy();
           }
-        }, dynamicTodynamic$()), {onError: dart.fn(_ => {
+        }, dynamicToFutureOr$()), {onError: dart.fn(_ => {
             this.destroy();
           }, dynamicTodynamic$())});
         outgoing.ignoreBody = request.method == "HEAD";
@@ -47913,8 +47971,8 @@
         if (dart.test(this[_isErrorResponse](response))) {
           dart.throw(this[_exceptionFromResponse](response, "Cannot get target of link", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfString()._check(response);
+      }, dynamicToFutureOrOfString()));
     }
     targetSync() {
       let result = io._File._linkTarget(this.path);
@@ -48382,6 +48440,9 @@
       }[this.index];
     }
   };
+  dart.setSignature(io.ProcessStartMode, {
+    fields: () => ({index: core.int})
+  });
   dart.defineEnumValues(io.ProcessStartMode, [
     'NORMAL',
     'DETACHED',
@@ -48450,14 +48511,14 @@
     })
   });
   const _signalNumber = Symbol('_signalNumber');
-  const _name$1 = Symbol('_name');
+  const _name$2 = Symbol('_name');
   io.ProcessSignal = class ProcessSignal extends core.Object {
     _(signalNumber, name) {
       this[_signalNumber] = signalNumber;
-      this[_name$1] = name;
+      this[_name$2] = name;
     }
     toString() {
-      return this[_name$1];
+      return this[_name$2];
     }
     watch() {
       return io._ProcessUtils._watchSignal(this);
@@ -48468,7 +48529,7 @@
     constructors: () => ({_: dart.definiteFunctionType(io.ProcessSignal, [core.int, core.String])}),
     fields: () => ({
       [_signalNumber]: core.int,
-      [_name$1]: core.String
+      [_name$2]: core.String
     }),
     methods: () => ({watch: dart.definiteFunctionType(async.Stream$(io.ProcessSignal), [])}),
     sfields: () => ({
@@ -48824,7 +48885,7 @@
         } else {
           this[_controller$0].add(secureConnection);
         }
-      }, RawSecureSocketTodynamic())).catchError(dart.fn((e, s) => {
+      }, RawSecureSocketToFutureOr())).catchError(dart.fn((e, s) => {
         if (!dart.test(this[_closed])) {
           this[_controller$0].addError(e, core.StackTrace._check(s));
         }
@@ -49123,7 +49184,7 @@
       this[_closedWrite] = true;
       this[_closedRead] = true;
       if (this[_socket] != null) {
-        this[_socket].close().then(dart.dynamic)(dart.bind(this, _completeCloseCompleter));
+        this[_socket].close().then(dart.void)(dart.bind(this, _completeCloseCompleter));
       } else {
         this[_completeCloseCompleter]();
       }
@@ -49408,7 +49469,7 @@
             }
           }
           this[_tryFilter]();
-        }, _FilterStatusTodynamic())).catchError(dart.bind(this, _reportError));
+        }, _FilterStatusToFutureOr())).catchError(dart.bind(this, _reportError));
       }
     }
     [_readSocketOrBufferedData](bytes) {
@@ -50683,10 +50744,6 @@
       name: dart.definiteFunctionType(core.String, []),
       encoder: dart.definiteFunctionType(convert.Converter$(core.String, core.List$(core.int)), []),
       decoder: dart.definiteFunctionType(convert.Converter$(core.List$(core.int), core.String), [])
-    }),
-    methods: () => ({
-      encode: dart.definiteFunctionType(core.List$(core.int), [core.String]),
-      decode: dart.definiteFunctionType(core.String, [ListOfint()])
     })
   });
   io.SYSTEM_ENCODING = dart.const(new io.SystemEncoding());
@@ -51488,7 +51545,7 @@
     }
     bind(stream) {
       stream.listen(dart.fn(request => {
-        io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.dynamic)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
+        io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.void)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
       }, HttpRequestTovoid$()), {onDone: dart.fn(() => {
           this[_controller$0].close();
         }, VoidTovoid$())});
@@ -51901,7 +51958,7 @@
       this.socket.addStream(stream).then(dart.dynamic)(dart.fn(_ => {
         this[_done$]();
         this[_closeCompleter].complete(this.webSocket);
-      }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+      }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
           this[_closed] = true;
           this[_cancel$]();
           if (core.ArgumentError.is(error)) {
@@ -52037,7 +52094,7 @@
         function error(message) {
           response.detachSocket().then(dart.dynamic)(dart.fn(socket => {
             socket.destroy();
-          }, SocketTodynamic()));
+          }, SocketToFutureOr()));
           dart.throw(new io.WebSocketException(message));
         }
         dart.fn(error, StringTovoid$());
@@ -52882,14 +52939,7 @@
         [_checkIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
         [_checkInsertIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
         _get: dart.definiteFunctionType(E, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [core.Object, E]),
-        add: dart.definiteFunctionType(dart.void, [E]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
-        insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-        removeAt: dart.definiteFunctionType(E, [core.int]),
-        removeLast: dart.definiteFunctionType(E, []),
-        setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-        sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()])
+        _set: dart.definiteFunctionType(dart.void, [core.Object, E])
       }),
       statics: () => ({_checkRange: dart.definiteFunctionType(dart.dynamic, [core.int, core.int, core.int])}),
       names: ['_checkRange']
@@ -55445,15 +55495,15 @@
       let completer = CompleterOfDatabase().new();
       this[dartx.onComplete].first.then(dart.dynamic)(dart.fn(_ => {
         completer.complete(this[dartx.db]);
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       this[dartx.onError].first.then(dart.dynamic)(dart.fn(e => {
         completer.completeError(e);
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       this[dartx.onAbort].first.then(dart.dynamic)(dart.fn(e => {
         if (!dart.test(completer.isCompleted)) {
           completer.completeError(e);
         }
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       return completer.future;
     }
     static _() {
@@ -72212,17 +72262,11 @@
   html$.DomStringList[dart.implements] = () => [ListOfString()];
   dart.setSignature(html$.DomStringList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.DomStringList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.String, []),
-      [dartx.last]: dart.definiteFunctionType(core.String, []),
-      [dartx.single]: dart.definiteFunctionType(core.String, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
       [__getter__]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx.item]: dart.definiteFunctionType(core.String, [core.int])
     })
@@ -72391,10 +72435,6 @@
     }),
     getters: () => ({
       length: dart.definiteFunctionType(core.int, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Element), []),
-      first: dart.definiteFunctionType(html$.Element, []),
-      last: dart.definiteFunctionType(html$.Element, []),
-      single: dart.definiteFunctionType(html$.Element, []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
@@ -72402,18 +72442,7 @@
       _get: dart.definiteFunctionType(html$.Element, [core.int]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
       add: dart.definiteFunctionType(html$.Element, [html$.Element]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-      sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-      removeWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-      retainWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-      [_filter$0]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-      replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Element]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-      removeAt: dart.definiteFunctionType(html$.Element, [core.int]),
-      removeLast: dart.definiteFunctionType(html$.Element, [])
+      [_filter$0]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool])
     })
   });
   dart.defineExtensionMembers(html$._ChildrenElementList, [
@@ -72728,9 +72757,6 @@
       fields: () => ({[_nodeList]: ListOfNode()}),
       getters: () => ({
         length: dart.definiteFunctionType(core.int, []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, []),
         classes: dart.definiteFunctionType(html$.CssClassSet, []),
         style: dart.definiteFunctionType(html$.CssStyleDeclarationBase, []),
         contentEdge: dart.definiteFunctionType(html$.CssRect, []),
@@ -72814,8 +72840,7 @@
       }),
       methods: () => ({
         _get: dart.definiteFunctionType(E, [core.int]),
-        _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-        sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfE()])
+        _set: dart.definiteFunctionType(dart.void, [core.int, E])
       })
     });
     dart.defineExtensionMembers(_FrozenElementList, [
@@ -73583,17 +73608,11 @@
   html$.FileList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfFile()];
   dart.setSignature(html$.FileList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.FileList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.File, []),
-      [dartx.last]: dart.definiteFunctionType(html$.File, []),
-      [dartx.single]: dart.definiteFunctionType(html$.File, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.File, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.File]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.File, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.File, [core.int])
     })
   });
@@ -75661,17 +75680,11 @@
   html$.HtmlCollection[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$.HtmlCollection, {
     constructors: () => ({_: dart.definiteFunctionType(html$.HtmlCollection, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(core.Object, [core.String])
     })
@@ -80855,17 +80868,11 @@
   html$.MimeTypeArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfMimeType()];
   dart.setSignature(html$.MimeTypeArray, {
     constructors: () => ({_: dart.definiteFunctionType(html$.MimeTypeArray, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.MimeType, []),
-      [dartx.last]: dart.definiteFunctionType(html$.MimeType, []),
-      [dartx.single]: dart.definiteFunctionType(html$.MimeType, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.MimeType]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(html$.MimeType, [core.String])
     })
@@ -81205,7 +81212,7 @@
     }
     static new(callback) {
       0;
-      return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(html$._wrapZoneBinaryCallback)(html$._wrapBinaryZone(dart.dynamic, dart.dynamic, dart.dynamic)(callback), 2));
+      return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void())(html$._wrapBinaryZone(ListOfMutationRecord(), html$.MutationObserver, dart.void)(callback), 2));
     }
   };
   dart.setSignature(html$.MutationObserver, {
@@ -81898,29 +81905,13 @@
     constructors: () => ({new: dart.definiteFunctionType(html$._ChildNodeListLazy, [html$.Node])}),
     fields: () => ({[_this]: html$.Node}),
     getters: () => ({
-      first: dart.definiteFunctionType(html$.Node, []),
-      last: dart.definiteFunctionType(html$.Node, []),
-      single: dart.definiteFunctionType(html$.Node, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Node), []),
       length: dart.definiteFunctionType(core.int, []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
-      add: dart.definiteFunctionType(dart.void, [html$.Node]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfNode()]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-      setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-      removeLast: dart.definiteFunctionType(html$.Node, []),
-      removeAt: dart.definiteFunctionType(html$.Node, [core.int]),
       [_filter$0]: dart.definiteFunctionType(dart.void, [NodeTobool(), core.bool]),
-      removeWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
-      retainWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfNode()]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfNode()], [core.int]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Node]),
       _get: dart.definiteFunctionType(html$.Node, [core.int])
     })
   });
@@ -82097,17 +82088,11 @@
   html$.NodeList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$.NodeList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.NodeList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [_item]: dart.definiteFunctionType(html$.Node, [core.int])
     })
   });
@@ -83788,17 +83773,11 @@
   html$.PluginArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfPlugin()];
   dart.setSignature(html$.PluginArray, {
     constructors: () => ({_: dart.definiteFunctionType(html$.PluginArray, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Plugin, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Plugin, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Plugin, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Plugin]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(html$.Plugin, [core.String]),
       [dartx.refresh]: dart.definiteFunctionType(dart.void, [core.bool])
@@ -87270,17 +87249,11 @@
   html$.SourceBufferList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSourceBuffer()];
   dart.setSignature(html$.SourceBufferList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.SourceBufferList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SourceBuffer, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SourceBuffer, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SourceBuffer, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SourceBuffer, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SourceBuffer]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SourceBuffer, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.SourceBuffer, [core.int])
     })
   });
@@ -87524,17 +87497,11 @@
       _: dart.definiteFunctionType(html$.SpeechGrammarList, []),
       new: dart.definiteFunctionType(html$.SpeechGrammarList, [])
     }),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SpeechGrammar, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SpeechGrammar, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SpeechGrammar, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SpeechGrammar]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int]),
       [dartx.addFromString]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
       [dartx.addFromUri]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
       [dartx.item]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int])
@@ -89732,17 +89699,11 @@
   html$.TextTrackCueList[dart.implements] = () => [ListOfTextTrackCue(), _js_helper.JavaScriptIndexingBehavior];
   dart.setSignature(html$.TextTrackCueList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.TextTrackCueList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.TextTrackCue, []),
-      [dartx.last]: dart.definiteFunctionType(html$.TextTrackCue, []),
-      [dartx.single]: dart.definiteFunctionType(html$.TextTrackCue, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.TextTrackCue, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.TextTrackCue]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.TextTrackCue, [core.int]),
       [dartx.getCueById]: dart.definiteFunctionType(html$.TextTrackCue, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.TextTrackCue, [core.int])
     })
@@ -89822,9 +89783,6 @@
     constructors: () => ({_: dart.definiteFunctionType(html$.TextTrackList, [])}),
     getters: () => ({
       [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.TextTrack, []),
-      [dartx.last]: dart.definiteFunctionType(html$.TextTrack, []),
-      [dartx.single]: dart.definiteFunctionType(html$.TextTrack, []),
       [dartx.onAddTrack]: dart.definiteFunctionType(async.Stream$(html$.TrackEvent), []),
       [dartx.onChange]: dart.definiteFunctionType(async.Stream$(html$.Event), [])
     }),
@@ -89832,7 +89790,6 @@
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.TextTrack, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.TextTrack]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.TextTrack, [core.int]),
       [dartx.getTrackById]: dart.definiteFunctionType(html$.TextTrack, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.TextTrack, [core.int])
     }),
@@ -90183,17 +90140,11 @@
       new: dart.definiteFunctionType(html$.TouchList, []),
       _: dart.definiteFunctionType(html$.TouchList, [])
     }),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Touch, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Touch, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Touch, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Touch, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Touch]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Touch, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Touch, [core.int])
     }),
     sgetters: () => ({supported: dart.definiteFunctionType(core.bool, [])})
@@ -94067,17 +94018,11 @@
   html$._ClientRectList[dart.implements] = () => [ListOfRectangleOfnum()];
   dart.setSignature(html$._ClientRectList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._ClientRectList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-      [dartx.last]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-      [dartx.single]: dart.definiteFunctionType(math.Rectangle$(core.num), [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, RectangleOfnum()]),
-      [dartx.elementAt]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [__getter__]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [dartx.item]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int])
     })
@@ -94144,17 +94089,11 @@
   html$._CssRuleList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfCssRule()];
   dart.setSignature(html$._CssRuleList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._CssRuleList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.CssRule, []),
-      [dartx.last]: dart.definiteFunctionType(html$.CssRule, []),
-      [dartx.single]: dart.definiteFunctionType(html$.CssRule, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.CssRule, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.CssRule]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.CssRule, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.CssRule, [core.int])
     })
   });
@@ -94397,17 +94336,11 @@
   html$._GamepadList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfGamepad()];
   dart.setSignature(html$._GamepadList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._GamepadList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Gamepad, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Gamepad, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Gamepad, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Gamepad, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Gamepad]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Gamepad, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Gamepad, [core.int])
     })
   });
@@ -94606,17 +94539,11 @@
   html$._NamedNodeMap[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$._NamedNodeMap, {
     constructors: () => ({_: dart.definiteFunctionType(html$._NamedNodeMap, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.getNamedItem]: dart.definiteFunctionType(html$._Attr, [core.String]),
       [dartx.getNamedItemNS]: dart.definiteFunctionType(html$._Attr, [core.String, core.String]),
       [dartx.item]: dart.definiteFunctionType(html$._Attr, [core.int]),
@@ -94816,17 +94743,11 @@
   html$._SpeechRecognitionResultList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSpeechRecognitionResult()];
   dart.setSignature(html$._SpeechRecognitionResultList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._SpeechRecognitionResultList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SpeechRecognitionResult, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SpeechRecognitionResult, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SpeechRecognitionResult]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int])
     })
   });
@@ -94894,17 +94815,11 @@
   html$._StyleSheetList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfStyleSheet()];
   dart.setSignature(html$._StyleSheetList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._StyleSheetList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.StyleSheet, []),
-      [dartx.last]: dart.definiteFunctionType(html$.StyleSheet, []),
-      [dartx.single]: dart.definiteFunctionType(html$.StyleSheet, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.StyleSheet, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.StyleSheet]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.StyleSheet, [core.int]),
       [__getter__]: dart.definiteFunctionType(html$.CssStyleSheet, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.StyleSheet, [core.int])
     })
@@ -96286,10 +96201,7 @@
         [_eventType]: core.String,
         [_useCapture]: core.bool
       }),
-      methods: () => ({
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-        listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-      })
+      methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
     });
     return _EventStream;
   });
@@ -96390,8 +96302,7 @@
       methods: () => ({
         matches: dart.definiteFunctionType(async.Stream$(T), [core.String]),
         listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-        capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()]),
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()})
+        capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()])
       })
     });
     return _ElementListEventStreamImpl;
@@ -96553,7 +96464,6 @@
       }),
       methods: () => ({
         listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
         add: dart.definiteFunctionType(dart.void, [T])
       })
     });
@@ -96831,8 +96741,7 @@
   dart.addSimpleTypeTests(html$._CustomKeyEventStreamImpl);
   html$._CustomKeyEventStreamImpl[dart.implements] = () => [CustomStreamOfKeyEvent()];
   dart.setSignature(html$._CustomKeyEventStreamImpl, {
-    constructors: () => ({new: dart.definiteFunctionType(html$._CustomKeyEventStreamImpl, [core.String])}),
-    methods: () => ({add: dart.definiteFunctionType(dart.void, [html$.KeyEvent])})
+    constructors: () => ({new: dart.definiteFunctionType(html$._CustomKeyEventStreamImpl, [core.String])})
   });
   const _subscriptions = Symbol('_subscriptions');
   const _controller$1 = Symbol('_controller');
@@ -98421,21 +98330,13 @@
       constructors: () => ({new: dart.definiteFunctionType(html$._WrappedList$(E), [ListOfNode()])}),
       fields: () => ({[_list$]: ListOfNode()}),
       getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
         length: dart.definiteFunctionType(core.int, []),
         rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
       }),
       setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
       methods: () => ({
-        add: dart.definiteFunctionType(dart.void, [E]),
         _get: dart.definiteFunctionType(E, [core.int]),
-        _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-        sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()]),
-        insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-        removeAt: dart.definiteFunctionType(E, [core.int]),
-        setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-        replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()]),
-        fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [E])
+        _set: dart.definiteFunctionType(dart.void, [core.int, E])
       })
     });
     dart.defineExtensionMembers(_WrappedList, [
@@ -99788,25 +99689,12 @@
     getters: () => ({
       [_iterable$0]: dart.definiteFunctionType(core.Iterable$(html$.Element), []),
       [_filtered]: dart.definiteFunctionType(core.List$(html$.Element), []),
-      reversed: dart.definiteFunctionType(core.Iterable$(html$.Element), []),
       length: dart.definiteFunctionType(core.int, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Element), []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
-      forEach: dart.definiteFunctionType(dart.void, [ElementTovoid()]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      add: dart.definiteFunctionType(dart.void, [html$.Element]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-      sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Element]),
-      replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-      removeLast: dart.definiteFunctionType(html$.Element, []),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-      removeAt: dart.definiteFunctionType(html$.Element, [core.int]),
       _get: dart.definiteFunctionType(html$.Element, [core.int])
     })
   });
@@ -103477,17 +103365,11 @@
   dart.setSignature(svg$.LengthList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.LengthList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Length, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Length, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Length, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Length, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Length]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Length, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Length]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Length, [svg$.Length]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.Length, [core.int]),
@@ -104083,17 +103965,11 @@
   dart.setSignature(svg$.NumberList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.NumberList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Number, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Number, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Number, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Number, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Number]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Number, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Number]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Number, [svg$.Number]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.Number, [core.int]),
@@ -105068,17 +104944,11 @@
   dart.setSignature(svg$.PathSegList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.PathSegList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.PathSeg, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.PathSeg, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.PathSeg, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.PathSeg]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.PathSeg]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.PathSeg, [svg$.PathSeg]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
@@ -105833,17 +105703,11 @@
   dart.setSignature(svg$.StringList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.StringList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.String, []),
-      [dartx.last]: dart.definiteFunctionType(core.String, []),
-      [dartx.single]: dart.definiteFunctionType(core.String, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
       [dartx.appendItem]: dart.definiteFunctionType(core.String, [core.String]),
       [dartx.getItem]: dart.definiteFunctionType(core.String, [core.int]),
@@ -106717,17 +106581,11 @@
   dart.setSignature(svg$.TransformList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.TransformList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Transform, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Transform, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Transform, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Transform, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Transform]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Transform, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Transform]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Transform, [svg$.Transform]),
       [dartx.consolidate]: dart.definiteFunctionType(svg$.Transform, []),
@@ -110764,17 +110622,11 @@
   web_sql.SqlResultSetRowList[dart.implements] = () => [ListOfMap()];
   dart.setSignature(web_sql.SqlResultSetRowList, {
     constructors: () => ({_: dart.definiteFunctionType(web_sql.SqlResultSetRowList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.Map, []),
-      [dartx.last]: dart.definiteFunctionType(core.Map, []),
-      [dartx.single]: dart.definiteFunctionType(core.Map, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.Map, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.Map]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.Map, [core.int]),
       [dartx.item]: dart.definiteFunctionType(core.Map, [core.int]),
       [_item_1]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
     })
diff --git a/pkg/dev_compiler/lib/js/es6/dart_sdk.js b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
index 12f64f0..86ce6a6 100644
--- a/pkg/dev_compiler/lib/js/es6/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
@@ -165,6 +165,8 @@
 let _AsyncBroadcastStreamController = () => (_AsyncBroadcastStreamController = dart.constFn(async._AsyncBroadcastStreamController$()))();
 let _AsBroadcastStreamController = () => (_AsBroadcastStreamController = dart.constFn(async._AsBroadcastStreamController$()))();
 let _DoneSubscription = () => (_DoneSubscription = dart.constFn(async._DoneSubscription$()))();
+let FutureOr = () => (FutureOr = dart.constFn(async.FutureOr$()))();
+let dynamicToFutureOr = () => (dynamicToFutureOr = dart.constFn(dart.functionType(async.FutureOr, [dart.dynamic])))();
 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.functionType(dart.dynamic, [])))();
 let Future = () => (Future = dart.constFn(async.Future$()))();
 let Completer = () => (Completer = dart.constFn(async.Completer$()))();
@@ -385,14 +387,20 @@
 let ListOfListOfint = () => (ListOfListOfint = dart.constFn(core.List$(ListOfint())))();
 let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))();
 let FutureOfDirectory = () => (FutureOfDirectory = dart.constFn(async.Future$(io.Directory)))();
+let FutureOrOfDirectory = () => (FutureOrOfDirectory = dart.constFn(async.FutureOr$(io.Directory)))();
 let StreamOfFileSystemEntity = () => (StreamOfFileSystemEntity = dart.constFn(async.Stream$(io.FileSystemEntity)))();
 let JSArrayOfFileSystemEntity = () => (JSArrayOfFileSystemEntity = dart.constFn(_interceptors.JSArray$(io.FileSystemEntity)))();
+let FutureOrOfString = () => (FutureOrOfString = dart.constFn(async.FutureOr$(core.String)))();
+let FutureOrOfbool = () => (FutureOrOfbool = dart.constFn(async.FutureOr$(core.bool)))();
+let FutureOrOfint = () => (FutureOrOfint = dart.constFn(async.FutureOr$(core.int)))();
 let ListOfFileSystemEntity = () => (ListOfFileSystemEntity = dart.constFn(core.List$(io.FileSystemEntity)))();
 let StreamControllerOfListOfint = () => (StreamControllerOfListOfint = dart.constFn(async.StreamController$(ListOfint())))();
 let FutureOfRandomAccessFile = () => (FutureOfRandomAccessFile = dart.constFn(async.Future$(io.RandomAccessFile)))();
 let CompleterOfFile = () => (CompleterOfFile = dart.constFn(async.Completer$(io.File)))();
 let FutureOfListOfint = () => (FutureOfListOfint = dart.constFn(async.Future$(ListOfint())))();
+let FutureOrOfFile = () => (FutureOrOfFile = dart.constFn(async.FutureOr$(io.File)))();
 let FutureOfFile = () => (FutureOfFile = dart.constFn(async.Future$(io.File)))();
+let FutureOrOfListOfint = () => (FutureOrOfListOfint = dart.constFn(async.FutureOr$(ListOfint())))();
 let ListOfFileSystemEntityType = () => (ListOfFileSystemEntityType = dart.constFn(core.List$(io.FileSystemEntityType)))();
 let StreamOfHttpRequest = () => (StreamOfHttpRequest = dart.constFn(async.Stream$(io.HttpRequest)))();
 let ListOfRedirectInfo = () => (ListOfRedirectInfo = dart.constFn(core.List$(io.RedirectInfo)))();
@@ -401,6 +409,7 @@
 let StringAndListOfStringTovoid = () => (StringAndListOfStringTovoid = dart.constFn(dart.functionType(dart.void, [core.String, ListOfString()])))();
 let FutureOfHttpClientResponse = () => (FutureOfHttpClientResponse = dart.constFn(async.Future$(io.HttpClientResponse)))();
 let StreamSubscriptionOfListOfint = () => (StreamSubscriptionOfListOfint = dart.constFn(async.StreamSubscription$(ListOfint())))();
+let FutureOrOfHttpClientResponse = () => (FutureOrOfHttpClientResponse = dart.constFn(async.FutureOr$(io.HttpClientResponse)))();
 let _StreamSinkImpl = () => (_StreamSinkImpl = dart.constFn(io._StreamSinkImpl$()))();
 let StreamConsumerOfListOfint = () => (StreamConsumerOfListOfint = dart.constFn(async.StreamConsumer$(ListOfint())))();
 let _HttpOutboundMessage = () => (_HttpOutboundMessage = dart.constFn(io._HttpOutboundMessage$()))();
@@ -412,11 +421,13 @@
 let FutureOfSecureSocket = () => (FutureOfSecureSocket = dart.constFn(async.Future$(io.SecureSocket)))();
 let HashSetOf_HttpClientConnection = () => (HashSetOf_HttpClientConnection = dart.constFn(collection.HashSet$(io._HttpClientConnection)))();
 let FutureOf_ConnectionInfo = () => (FutureOf_ConnectionInfo = dart.constFn(async.Future$(io._ConnectionInfo)))();
+let FutureOrOf_ConnectionInfo = () => (FutureOrOf_ConnectionInfo = dart.constFn(async.FutureOr$(io._ConnectionInfo)))();
 let SetOf_HttpClientConnection = () => (SetOf_HttpClientConnection = dart.constFn(core.Set$(io._HttpClientConnection)))();
 let HashMapOfString$_ConnectionTarget = () => (HashMapOfString$_ConnectionTarget = dart.constFn(collection.HashMap$(core.String, io._ConnectionTarget)))();
 let JSArrayOf_Credentials = () => (JSArrayOf_Credentials = dart.constFn(_interceptors.JSArray$(io._Credentials)))();
 let JSArrayOf_ProxyCredentials = () => (JSArrayOf_ProxyCredentials = dart.constFn(_interceptors.JSArray$(io._ProxyCredentials)))();
 let FutureOf_HttpClientRequest = () => (FutureOf_HttpClientRequest = dart.constFn(async.Future$(io._HttpClientRequest)))();
+let FutureOrOf_HttpClientRequest = () => (FutureOrOf_HttpClientRequest = dart.constFn(async.FutureOr$(io._HttpClientRequest)))();
 let X509CertificateAndStringAndintTobool = () => (X509CertificateAndStringAndintTobool = dart.constFn(dart.functionType(core.bool, [io.X509Certificate, core.String, core.int])))();
 let FutureOfbool = () => (FutureOfbool = dart.constFn(async.Future$(core.bool)))();
 let UriAndStringAndStringToFutureOfbool = () => (UriAndStringAndStringToFutureOfbool = dart.constFn(dart.functionType(FutureOfbool(), [core.Uri, core.String, core.String])))();
@@ -544,6 +555,7 @@
 let EventStreamProviderOfMidiMessageEvent = () => (EventStreamProviderOfMidiMessageEvent = dart.constFn(html.EventStreamProvider$(html.MidiMessageEvent)))();
 let ListOfMimeType = () => (ListOfMimeType = dart.constFn(core.List$(html.MimeType)))();
 let ListOfMutationRecord = () => (ListOfMutationRecord = dart.constFn(core.List$(html.MutationRecord)))();
+let _wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = () => (_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = dart.constFn(html._wrapZoneBinaryCallback$(ListOfMutationRecord(), html.MutationObserver, dart.void)))();
 let MapOfString$bool = () => (MapOfString$bool = dart.constFn(core.Map$(core.String, core.bool)))();
 let CompleterOfMediaStream = () => (CompleterOfMediaStream = dart.constFn(async.Completer$(html.MediaStream)))();
 let NodeTobool = () => (NodeTobool = dart.constFn(dart.functionType(core.bool, [html.Node])))();
@@ -631,6 +643,7 @@
 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
 let StringAndStringToint = () => (StringAndStringToint = dart.constFn(dart.definiteFunctionType(core.int, [core.String, core.String])))();
 let VoidTo_MethodStats = () => (VoidTo_MethodStats = dart.constFn(dart.definiteFunctionType(dart._MethodStats, [])))();
+let VoidToFunctionType = () => (VoidToFunctionType = dart.constFn(dart.definiteFunctionType(dart.FunctionType, [])))();
 let dynamicToString = () => (dynamicToString = dart.constFn(dart.definiteFunctionType(core.String, [dart.dynamic])))();
 let dynamicToListOfString = () => (dynamicToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [dart.dynamic])))();
 let dynamicToList = () => (dynamicToList = dart.constFn(dart.definiteFunctionType(core.List, [dart.dynamic])))();
@@ -666,8 +679,9 @@
 let VoidTobool = () => (VoidTobool = dart.constFn(dart.definiteFunctionType(core.bool, [])))();
 let VoidTo_IsolateContext = () => (VoidTo_IsolateContext = dart.constFn(dart.definiteFunctionType(_isolate_helper._IsolateContext, [])))();
 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
-let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.List])))();
+let ListToFutureOr = () => (ListToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [core.List])))();
 let StringTodynamic = () => (StringTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.String])))();
+let dynamicToFutureOr = () => (dynamicToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [dart.dynamic])))();
 let TimerTovoid = () => (TimerTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [async.Timer])))();
 let dynamicToFuture = () => (dynamicToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [dart.dynamic])))();
 let boolTodynamic = () => (boolTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.bool])))();
@@ -793,11 +807,15 @@
 let ListAndintAndintTo_BufferAndStart = () => (ListAndintAndintTo_BufferAndStart = dart.constFn(dart.definiteFunctionType(io._BufferAndStart, [core.List, core.int, core.int])))();
 let intTovoid = () => (intTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.int])))();
 let DirectoryToFutureOfDirectory = () => (DirectoryToFutureOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOfDirectory(), [io.Directory])))();
+let boolToFutureOrOfDirectory = () => (boolToFutureOrOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOrOfDirectory(), [core.bool])))();
 let dynamicTo_Directory = () => (dynamicTo_Directory = dart.constFn(dart.definiteFunctionType(io._Directory, [dart.dynamic])))();
 let dynamicToDirectory = () => (dynamicToDirectory = dart.constFn(dart.definiteFunctionType(io.Directory, [dart.dynamic])))();
-let ListOfintTodynamic = () => (ListOfintTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [ListOfint()])))();
+let dynamicToFutureOrOfString = () => (dynamicToFutureOrOfString = dart.constFn(dart.definiteFunctionType(FutureOrOfString(), [dart.dynamic])))();
+let dynamicToFutureOrOfbool = () => (dynamicToFutureOrOfbool = dart.constFn(dart.definiteFunctionType(FutureOrOfbool(), [dart.dynamic])))();
+let dynamicToFutureOrOfint = () => (dynamicToFutureOrOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfint(), [dart.dynamic])))();
+let ListOfintToFutureOr = () => (ListOfintToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [ListOfint()])))();
 let RandomAccessFileTovoid = () => (RandomAccessFileTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.RandomAccessFile])))();
-let RandomAccessFileTodynamic = () => (RandomAccessFileTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RandomAccessFile])))();
+let RandomAccessFileToFutureOr = () => (RandomAccessFileToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RandomAccessFile])))();
 let ListOfintTovoid = () => (ListOfintTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint()])))();
 let RandomAccessFileToFutureOfRandomAccessFile = () => (RandomAccessFileToFutureOfRandomAccessFile = dart.constFn(dart.definiteFunctionType(FutureOfRandomAccessFile(), [io.RandomAccessFile])))();
 let dynamicTo_File = () => (dynamicTo_File = dart.constFn(dart.definiteFunctionType(io._File, [dart.dynamic])))();
@@ -811,6 +829,8 @@
 let ListOfintToString = () => (ListOfintToString = dart.constFn(dart.definiteFunctionType(core.String, [ListOfint()])))();
 let RandomAccessFileTo_File = () => (RandomAccessFileTo_File = dart.constFn(dart.definiteFunctionType(io._File, [io.RandomAccessFile])))();
 let RandomAccessFileToObject = () => (RandomAccessFileToObject = dart.constFn(dart.definiteFunctionType(core.Object, [io.RandomAccessFile])))();
+let RandomAccessFileToFutureOrOfFile = () => (RandomAccessFileToFutureOrOfFile = dart.constFn(dart.definiteFunctionType(FutureOrOfFile(), [io.RandomAccessFile])))();
+let dynamicToFutureOrOfListOfint = () => (dynamicToFutureOrOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfListOfint(), [dart.dynamic])))();
 let dynamicToFileStat = () => (dynamicToFileStat = dart.constFn(dart.definiteFunctionType(io.FileStat, [dart.dynamic])))();
 let StringAndListOfStringToListOfString = () => (StringAndListOfStringToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [core.String, ListOfString()])))();
 let StringAndListOfStringTovoid = () => (StringAndListOfStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, ListOfString()])))();
@@ -823,22 +843,25 @@
 let _AuthenticationSchemeTo_Credentials = () => (_AuthenticationSchemeTo_Credentials = dart.constFn(dart.definiteFunctionType(io._Credentials, [io._AuthenticationScheme])))();
 let _CredentialsTovoid = () => (_CredentialsTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io._Credentials])))();
 let _AuthenticationSchemeAndStringToFuture = () => (_AuthenticationSchemeAndStringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [io._AuthenticationScheme, core.String])))();
+let dynamicToFutureOrOfHttpClientResponse = () => (dynamicToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [dart.dynamic])))();
 let CookieTovoid = () => (CookieTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.Cookie])))();
+let ListToFutureOrOfHttpClientResponse = () => (ListToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [core.List])))();
 let HttpClientResponseTovoid = () => (HttpClientResponseTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.HttpClientResponse])))();
 let dynamicToIterable = () => (dynamicToIterable = dart.constFn(dart.definiteFunctionType(core.Iterable, [dart.dynamic])))();
 let dynamicTo_HttpOutboundMessage = () => (dynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic])))();
 let dynamicAnddynamicTo_HttpOutboundMessage = () => (dynamicAnddynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic, dart.dynamic])))();
 let dynamic__Todynamic = () => (dynamic__Todynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [core.StackTrace])))();
 let _HttpIncomingTovoid = () => (_HttpIncomingTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io._HttpIncoming])))();
-let _HttpIncomingTodynamic = () => (_HttpIncomingTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._HttpIncoming])))();
+let _HttpIncomingToFutureOr = () => (_HttpIncomingToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._HttpIncoming])))();
 let dynamicTo_DetachedSocket = () => (dynamicTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic])))();
 let SecureSocketTo_HttpClientConnection = () => (SecureSocketTo_HttpClientConnection = dart.constFn(dart.definiteFunctionType(io._HttpClientConnection, [io.SecureSocket])))();
 let HttpClientResponseToFutureOfSecureSocket = () => (HttpClientResponseToFutureOfSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfSecureSocket(), [io.HttpClientResponse])))();
 let X509CertificateTobool = () => (X509CertificateTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io.X509Certificate])))();
 let _HttpClientConnectionTo_ConnectionInfo = () => (_HttpClientConnectionTo_ConnectionInfo = dart.constFn(dart.definiteFunctionType(io._ConnectionInfo, [io._HttpClientConnection])))();
+let dynamicToFutureOrOf_ConnectionInfo = () => (dynamicToFutureOrOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOrOf_ConnectionInfo(), [dart.dynamic])))();
 let _ConnectionTargetTobool = () => (_ConnectionTargetTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io._ConnectionTarget])))();
 let _ConnectionInfoTo_HttpClientRequest = () => (_ConnectionInfoTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._ConnectionInfo])))();
-let _ConnectionInfoTodynamic = () => (_ConnectionInfoTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._ConnectionInfo])))();
+let _ConnectionInfoToFutureOrOf_HttpClientRequest = () => (_ConnectionInfoToFutureOrOf_HttpClientRequest = dart.constFn(dart.definiteFunctionType(FutureOrOf_HttpClientRequest(), [io._ConnectionInfo])))();
 let _HttpClientRequestTo_HttpClientRequest = () => (_HttpClientRequestTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._HttpClientRequest])))();
 let VoidTo_ConnectionTarget = () => (VoidTo_ConnectionTarget = dart.constFn(dart.definiteFunctionType(io._ConnectionTarget, [])))();
 let dynamicToFutureOf_ConnectionInfo = () => (dynamicToFutureOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOf_ConnectionInfo(), [dart.dynamic])))();
@@ -861,9 +884,9 @@
 let RawSecureSocketToSecureSocket = () => (RawSecureSocketToSecureSocket = dart.constFn(dart.definiteFunctionType(io.SecureSocket, [io.RawSecureSocket])))();
 let dynamicToFutureOfRawSecureSocket = () => (dynamicToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [dart.dynamic])))();
 let RawServerSocketToRawSecureServerSocket = () => (RawServerSocketToRawSecureServerSocket = dart.constFn(dart.definiteFunctionType(io.RawSecureServerSocket, [io.RawServerSocket])))();
-let RawSecureSocketTodynamic = () => (RawSecureSocketTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RawSecureSocket])))();
+let RawSecureSocketToFutureOr = () => (RawSecureSocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RawSecureSocket])))();
 let RawSocketToFutureOfRawSecureSocket = () => (RawSocketToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [io.RawSocket])))();
-let _FilterStatusTodynamic = () => (_FilterStatusTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._FilterStatus])))();
+let _FilterStatusToFutureOr = () => (_FilterStatusToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._FilterStatus])))();
 let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.int, [core.int])))();
 let dynamicTo_FilterStatus = () => (dynamicTo_FilterStatus = dart.constFn(dart.definiteFunctionType(io._FilterStatus, [dart.dynamic])))();
 let ListOfintAndStringTovoid = () => (ListOfintAndStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint(), core.String])))();
@@ -875,6 +898,7 @@
 let StringToFuture = () => (StringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [core.String])))();
 let EventSinkOfListOfintTo_WebSocketOutgoingTransformer = () => (EventSinkOfListOfintTo_WebSocketOutgoingTransformer = dart.constFn(dart.definiteFunctionType(io._WebSocketOutgoingTransformer, [EventSinkOfListOfint()])))();
 let dynamicTo_WebSocketImpl = () => (dynamicTo_WebSocketImpl = dart.constFn(dart.definiteFunctionType(io._WebSocketImpl, [dart.dynamic])))();
+let SocketToFutureOr = () => (SocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.Socket])))();
 let HttpClientResponseToFutureOfWebSocket = () => (HttpClientResponseToFutureOfWebSocket = dart.constFn(dart.definiteFunctionType(FutureOfWebSocket(), [io.HttpClientResponse])))();
 let HttpClientRequestToFutureOfHttpClientResponse = () => (HttpClientRequestToFutureOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOfHttpClientResponse(), [io.HttpClientRequest])))();
 let dynamicToMap = () => (dynamicToMap = dart.constFn(dart.definiteFunctionType(core.Map, [dart.dynamic])))();
@@ -897,7 +921,7 @@
 let EventTovoid = () => (EventTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [html.Event])))();
 let RequestToFutureOfT = () => (RequestToFutureOfT = dart.constFn(dart.definiteFunctionType(T => [async.Future$(T), [indexed_db.Request]])))();
 let dynamicToTo = () => (dynamicToTo = dart.constFn(dart.definiteFunctionType(To => [To, [dart.dynamic]])))();
-let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html.Event])))();
+let EventToFutureOr = () => (EventToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [html.Event])))();
 let NodeTobool = () => (NodeTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html.Node])))();
 let MapOfString$dynamicTobool = () => (MapOfString$dynamicTobool = dart.constFn(dart.definiteFunctionType(core.bool, [MapOfString$dynamic()])))();
 let UriAndListOfStringAnddynamicToFutureOfIsolate = () => (UriAndListOfStringAnddynamicToFutureOfIsolate = dart.constFn(dart.definiteFunctionType(FutureOfIsolate(), [core.Uri, ListOfString(), dart.dynamic])))();
@@ -931,6 +955,7 @@
 let SetOfStringTobool = () => (SetOfStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [SetOfString()])))();
 let SetOfStringTovoid = () => (SetOfStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [SetOfString()])))();
 let EventAndStringTobool = () => (EventAndStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html.Event, core.String])))();
+let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html.Event])))();
 let KeyEventTobool = () => (KeyEventTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html.KeyEvent])))();
 let NodeValidatorTobool = () => (NodeValidatorTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html.NodeValidator])))();
 let NodeAndNodeToint = () => (NodeAndNodeToint = dart.constFn(dart.definiteFunctionType(core.int, [html.Node, html.Node])))();
@@ -970,6 +995,27 @@
         dart.copyProperties(s, m[dart._methodSig]);
       }
       return s;
+    },
+    fields: () => {
+      let s = {};
+      for (let m of mixins) {
+        dart.copyProperties(s, m[dart._fieldSig]);
+      }
+      return s;
+    },
+    getters: () => {
+      let s = {};
+      for (let m of mixins) {
+        dart.copyProperties(s, m[dart._getterSig]);
+      }
+      return s;
+    },
+    setters: () => {
+      let s = {};
+      for (let m of mixins) {
+        dart.copyProperties(s, m[dart._setterSig]);
+      }
+      return s;
     }
   });
   Mixin[dart._mixins] = mixins;
@@ -1072,15 +1118,24 @@
 dart.getGenericTypeCtor = function(value) {
   return value[dart._genericTypeCtor];
 };
-dart.getMethodType = function(obj, name) {
-  let type = obj == null ? core.Object : obj.__proto__.constructor;
-  return dart.getMethodTypeFromType(type, name);
+dart.getType = function(obj) {
+  return obj == null ? core.Object : obj.__proto__.constructor;
 };
-dart.getMethodTypeFromType = function(type, name) {
+dart.getMethodType = function(type, name) {
   let sigObj = type[dart._methodSig];
   if (sigObj === void 0) return void 0;
   return sigObj[name];
 };
+dart.getFieldType = function(type, name) {
+  let sigObj = type[dart._fieldSig];
+  if (sigObj === void 0) return void 0;
+  return sigObj[name];
+};
+dart.getSetterType = function(type, name) {
+  let sigObj = type[dart._setterSig];
+  if (sigObj === void 0) return void 0;
+  return sigObj[name];
+};
 dart.classGetConstructorType = function(cls, name) {
   if (!name) name = 'new';
   if (cls === void 0) return void 0;
@@ -1092,7 +1147,7 @@
 dart.bind = function(obj, name, f) {
   if (f === void 0) f = obj[name];
   f = f.bind(obj);
-  let sig = dart.getMethodType(obj, name);
+  let sig = dart.getMethodType(dart.getType(obj), name);
   dart.assert(sig);
   dart.tag(f, sig);
   return f;
@@ -1106,7 +1161,8 @@
 dart._setInstanceSignature = function(f, sigF, kind) {
   dart.defineMemoizedGetter(f, kind, () => {
     let sigObj = sigF();
-    sigObj.__proto__ = f.__proto__[kind];
+    let proto = f.__proto__;
+    sigObj.__proto__ = kind in proto ? proto[kind] : null;
     return sigObj;
   });
 };
@@ -1167,8 +1223,22 @@
   dart._setStaticSetterSignature(f, staticSetters);
   dart._setStaticTypes(f, names);
 };
-dart.hasMethod = function(obj, name) {
-  return dart.getMethodType(obj, name) !== void 0;
+dart._hasSigEntry = function(type, sigF, name) {
+  let sigObj = type[sigF];
+  if (sigObj === void 0) return false;
+  return name in sigObj;
+};
+dart.hasMethod = function(type, name) {
+  return dart._hasSigEntry(type, dart._methodSig, name);
+};
+dart.hasGetter = function(type, name) {
+  return dart._hasSigEntry(type, dart._getterSig, name);
+};
+dart.hasSetter = function(type, name) {
+  return dart._hasSigEntry(type, dart._setterSig, name);
+};
+dart.hasField = function(type, name) {
+  return dart._hasSigEntry(type, dart._fieldSig, name);
 };
 dart.defineNamedConstructor = function(clazz, name) {
   let proto = clazz.prototype;
@@ -1229,9 +1299,15 @@
   if (!jsProto) return;
   jsProto[dart._extensionType] = dartExtType;
   dart._installProperties(jsProto, extProto);
-  let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, dart._methodSig).get;
-  dart.assert(originalSigFn);
-  dart.defineMemoizedGetter(jsType, dart._methodSig, originalSigFn);
+  function updateSig(sigF) {
+    let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, sigF).get;
+    dart.assert(originalSigFn);
+    dart.defineMemoizedGetter(jsType, sigF, originalSigFn);
+  }
+  updateSig(dart._methodSig);
+  updateSig(dart._fieldSig);
+  updateSig(dart._getterSig);
+  updateSig(dart._setterSig);
 };
 dart.defineExtensionMembers = function(type, methodNames) {
   let proto = type.prototype;
@@ -1239,14 +1315,23 @@
     let method = dart.getOwnPropertyDescriptor(proto, name);
     dart.defineProperty(proto, dart.getExtensionSymbol(name), method);
   }
-  let originalSigFn = dart.getOwnPropertyDescriptor(type, dart._methodSig).get;
-  dart.defineMemoizedGetter(type, dart._methodSig, function() {
-    let sig = originalSigFn();
-    for (let name of methodNames) {
-      sig[dart.getExtensionSymbol(name)] = sig[name];
-    }
-    return sig;
-  });
+  function upgradeSig(sigF) {
+    let originalSigFn = dart.getOwnPropertyDescriptor(type, sigF).get;
+    dart.defineMemoizedGetter(type, sigF, function() {
+      let sig = originalSigFn();
+      let propertyNames = Object.getOwnPropertyNames(sig);
+      for (let name of methodNames) {
+        if (name in sig) {
+          sig[dart.getExtensionSymbol(name)] = sig[name];
+        }
+      }
+      return sig;
+    });
+  }
+  upgradeSig(dart._methodSig);
+  upgradeSig(dart._fieldSig);
+  upgradeSig(dart._getterSig);
+  upgradeSig(dart._setterSig);
 };
 dart.setType = function(obj, type) {
   obj.__proto__ = type.prototype;
@@ -1447,6 +1532,65 @@
     return dart._asInstanceOfLazyJSType(object, this);
   };
 };
+dart._memoizeArray = function(map, arr, create) {
+  let len = arr.length;
+  map = dart._lookupNonTerminal(map, len);
+  for (var i = 0; i < len - 1; ++i) {
+    map = dart._lookupNonTerminal(map, arr[i]);
+  }
+  let result = map.get(arr[len - 1]);
+  if (result !== void 0) return result;
+  map.set(arr[len - 1], result = create());
+  return result;
+};
+dart._normalizeParameter = function(a) {
+  if (a instanceof Array) {
+    let result = [];
+    result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
+    result.push(a.slice(1));
+    return result;
+  }
+  return a == dart.dynamic ? dart.bottom : a;
+};
+dart._canonicalizeArray = function(definite, array, map) {
+  let arr = definite ? array : array.map(dart._normalizeParameter);
+  return dart._memoizeArray(map, arr, () => arr);
+};
+dart._canonicalizeNamed = function(definite, named, map) {
+  let key = [];
+  let names = dart.getOwnPropertyNames(named);
+  let r = {};
+  for (var i = 0; i < names.length; ++i) {
+    let name = names[i];
+    let type = named[name];
+    if (!definite) r[name] = type = dart._normalizeParameter(type);
+    key.push(name);
+    key.push(type);
+  }
+  if (!definite) named = r;
+  return dart._memoizeArray(map, key, () => named);
+};
+dart._lookupNonTerminal = function(map, key) {
+  let result = map.get(key);
+  if (result !== void 0) return result;
+  map.set(key, result = new Map());
+  return result;
+};
+dart._createSmall = function(count, definite, returnType, required) {
+  let map = dart._fnTypeSmallMap[count];
+  let args = definite ? required : required.map(dart._normalizeParameter);
+  for (var i = 0; i < count; ++i) {
+    map = dart._lookupNonTerminal(map, args[i]);
+  }
+  let result = map.get(returnType);
+  if (result !== void 0) return result;
+  result = new dart.FunctionType(returnType, args, [], {});
+  map.set(returnType, result);
+  return result;
+};
+dart.typedef = function(name, closure) {
+  return new dart.Typedef(name, closure);
+};
 dart._functionType = function(definite, returnType, args, extra) {
   if (args === void 0 && extra === void 0) {
     const fnTypeParts = returnType;
@@ -1465,9 +1609,6 @@
 dart.definiteFunctionType = function(returnType, args, extra) {
   return dart._functionType(true, returnType, args, extra);
 };
-dart.typedef = function(name, closure) {
-  return new dart.Typedef(name, closure);
-};
 dart.typeName = function(type) {
   if (type === void 0) return "undefined type";
   if (type === null) return "null type";
@@ -1503,17 +1644,17 @@
 };
 dart.getImplicitFunctionType = function(type) {
   if (dart.test(dart.isFunctionType(type))) return type;
-  return dart.getMethodTypeFromType(type, 'call');
+  return dart.getMethodType(type, 'call');
 };
 dart.isFunctionType = function(type) {
   return type instanceof dart.AbstractFunctionType || type === core.Function;
 };
-dart.isLazyJSSubtype = function(t1, t2, covariant) {
+dart.isLazyJSSubtype = function(t1, t2, isCovariant) {
   if (dart.equals(t1, t2)) return true;
   if (t1[_jsTypeCallback] == null || t2[_jsTypeCallback] == null) return true;
-  return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], covariant);
+  return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], isCovariant);
 };
-dart.isFunctionSubtype = function(ft1, ft2, covariant) {
+dart.isFunctionSubtype = function(ft1, ft2, isCovariant) {
   if (ft2 === core.Function) {
     return true;
   }
@@ -1525,26 +1666,26 @@
   let args1 = ft1.args;
   let args2 = ft2.args;
   if (args1.length > args2.length) {
-    return covariant ? false : null;
+    return isCovariant ? false : null;
   }
   for (let i = 0; i < args1.length; ++i) {
-    if (!dart._isSubtype(args2[i], args1[i], !covariant)) {
+    if (!dart._isSubtype(args2[i], args1[i], !isCovariant)) {
       return null;
     }
   }
   let optionals1 = ft1.optionals;
   let optionals2 = ft2.optionals;
   if (args1.length + optionals1.length < args2.length + optionals2.length) {
-    return covariant ? false : null;
+    return isCovariant ? false : null;
   }
   let j = 0;
   for (let i = args1.length; i < args2.length; ++i, ++j) {
-    if (!dart._isSubtype(args2[i], optionals1[j], !covariant)) {
+    if (!dart._isSubtype(args2[i], optionals1[j], !isCovariant)) {
       return null;
     }
   }
   for (let i = 0; i < optionals2.length; ++i, ++j) {
-    if (!dart._isSubtype(optionals2[i], optionals1[j], !covariant)) {
+    if (!dart._isSubtype(optionals2[i], optionals1[j], !isCovariant)) {
       return null;
     }
   }
@@ -1556,15 +1697,17 @@
     let n1 = named1[name];
     let n2 = named2[name];
     if (n1 === void 0) {
-      return covariant ? false : null;
+      return isCovariant ? false : null;
     }
-    if (!dart._isSubtype(n2, n1, !covariant)) {
+    if (!dart._isSubtype(n2, n1, !isCovariant)) {
       return null;
     }
   }
   if (ret2 === dart.void) return true;
-  if (ret1 === dart.void) return ret2 === dart.dynamic;
-  if (!dart._isSubtype(ret1, ret2, covariant)) return null;
+  if (ret1 === dart.void) {
+    return ret2 === dart.dynamic || ret2 === async.FutureOr;
+  }
+  if (!dart._isSubtype(ret1, ret2, isCovariant)) return null;
   return true;
 };
 dart._subtypeMemo = function(f) {
@@ -1587,9 +1730,12 @@
   return type == dart.bottom;
 };
 dart._isTop = function(type) {
+  if (dart.getGenericClass(type) === dart.getGenericClass(async.FutureOr)) {
+    return dart._isTop(dart.getGenericArgs(type)[0]);
+  }
   return type == core.Object || type == dart.dynamic;
 };
-dart._isSubtype = function(t1, t2, covariant) {
+dart._isSubtype = function(t1, t2, isCovariant) {
   if (t1 === t2) return true;
   if (dart._isTop(t2) || dart._isBottom(t1)) {
     return true;
@@ -1600,20 +1746,20 @@
     return false;
   }
   if (!(t1 instanceof dart.AbstractFunctionType) && !(t2 instanceof dart.AbstractFunctionType)) {
-    let result = dart.isClassSubType(t1, t2, covariant);
+    let result = dart.isClassSubType(t1, t2, isCovariant);
     if (result === true || result === null) return result;
   }
   t1 = dart.getImplicitFunctionType(t1);
   if (!t1) return false;
   if (dart.isFunctionType(t1) && dart.isFunctionType(t2)) {
-    return dart.isFunctionSubtype(t1, t2, covariant);
+    return dart.isFunctionSubtype(t1, t2, isCovariant);
   }
   if (t1 instanceof dart.LazyJSType && t2 instanceof dart.LazyJSType) {
-    return dart.isLazyJSSubtype(t1, t2, covariant);
+    return dart.isLazyJSSubtype(t1, t2, isCovariant);
   }
   return false;
 };
-dart.isClassSubType = function(t1, t2, covariant) {
+dart.isClassSubType = function(t1, t2, isCovariant) {
   if (t1 == t2) return true;
   if (t1 == core.Object) return false;
   if (t1 == null) return t2 == core.Object || t2 == dart.dynamic;
@@ -1631,16 +1777,25 @@
     }
     dart.assert(length == typeArguments2.length);
     for (let i = 0; i < length; ++i) {
-      let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], covariant);
+      let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], isCovariant);
       if (!result) {
         return result;
       }
     }
     return true;
   }
+  if (raw1 === dart.getGenericClass(async.FutureOr)) {
+    let t1TypeArg = dart.getGenericArgs(t1)[0];
+    let t1Future = dart.getGenericClass(async.Future)(t1TypeArg);
+    return dart.isSubtype(t1Future, t2) && dart.isSubtype(t1TypeArg, t2);
+  } else if (raw2 === dart.getGenericClass(async.FutureOr)) {
+    let t2TypeArg = dart.getGenericArgs(t2)[0];
+    let t2Future = dart.getGenericClass(async.Future)(t2TypeArg);
+    return dart.isSubtype(t1, t2Future) || dart.isSubtype(t1, t2TypeArg);
+  }
   let indefinite = false;
   function definitive(t1, t2) {
-    let result = dart.isClassSubType(t1, t2, covariant);
+    let result = dart.isClassSubType(t1, t2, isCovariant);
     if (result == null) {
       indefinite = true;
       return false;
@@ -1749,7 +1904,7 @@
     }
     return future.then(dart.dynamic)(onValue, {onError: onError});
   }
-  return dart.getGenericClass(async.Future)(T).new(function() {
+  return dart.getGenericClass(async.Future)(T).microtask(function() {
     iter = gen.apply(null, args)[Symbol.iterator]();
     return onValue();
   });
@@ -1761,18 +1916,32 @@
   let f = dart._canonicalMember(obj, field);
   dart._trackCall(obj);
   if (f != null) {
-    if (dart.test(dart.hasMethod(obj, f))) return dart.bind(obj, f, void 0);
-    return obj[f];
+    let type = dart.getType(obj);
+    if (dart.test(dart.hasField(type, f)) || dart.test(dart.hasGetter(type, f))) return obj[f];
+    if (dart.test(dart.hasMethod(type, f))) return dart.bind(obj, f, void 0);
   }
-  return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [], {isGetter: true}));
+  return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [], {isGetter: true}));
 };
 dart.dput = function(obj, field, value) {
   let f = dart._canonicalMember(obj, field);
   dart._trackCall(obj);
   if (f != null) {
-    return obj[f] = value;
+    let objType = dart.getType(obj);
+    let setterType = dart.getSetterType(objType, f);
+    if (setterType != void 0) {
+      if (dart.test(dart.instanceOfOrNull(value, setterType.args[0]))) {
+        return obj[f] = value;
+      }
+    } else {
+      let fieldType = dart.getFieldType(objType, f);
+      if (fieldType != void 0) {
+        if (dart.test(dart.instanceOfOrNull(value, fieldType))) {
+          return obj[f] = value;
+        }
+      }
+    }
   }
-  return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [value], {isSetter: true}));
+  return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [value], {isSetter: true}));
 };
 dart._checkApply = function(type, actuals) {
   if (actuals.length < type.args.length) return false;
@@ -1803,8 +1972,36 @@
   }
   return true;
 };
+dart._toSymbolName = function(symbol) {
+  let str = symbol.toString();
+  return str.substring(7, str.length - 1);
+};
+dart._toDisplayName = function(name) {
+  if (name[0] === '_') {
+    switch (name) {
+      case '_get':
+      {
+        return '[]';
+      }
+      case '_set':
+      {
+        return '[]=';
+      }
+      case '_negate':
+      {
+        return 'unary-';
+      }
+      case '_constructor':
+      case '_prototype':
+      {
+        return name.substring(1);
+      }
+    }
+  }
+  return name;
+};
 dart._dartSymbol = function(name) {
-  return dart.const(core.Symbol.new(name.toString()));
+  return core.Symbol._check(typeof name === "symbol" ? dart.const(new _internal.Symbol.es6(dart._toSymbolName(name), name)) : dart.const(core.Symbol.new(dart._toDisplayName(name))));
 };
 dart.extractNamedArgs = function(args) {
   if (args.length > 0) {
@@ -1823,7 +2020,7 @@
   }
   if (!(f instanceof Function)) {
     if (f != null) {
-      ftype = dart.getMethodType(f, 'call');
+      ftype = dart.getMethodType(dart.getType(f), 'call');
       f = f.call;
     }
     if (!(f instanceof Function)) {
@@ -1928,16 +2125,17 @@
     }
   }
   let actualTypeName = dart.typeName(actual);
-  let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(core.String._check(actualTypeName), src), VoidTo_MethodStats()));
+  let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(actualTypeName, src), VoidTo_MethodStats()));
   o.count = dart.notNull(o.count) + 1;
 };
 dart._callMethod = function(obj, name, typeArgs, args, displayName) {
   let symbol = dart._canonicalMember(obj, name);
   if (symbol == null) {
-    return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(displayName), core.List._check(args), {isMethod: true}));
+    return dart.noSuchMethod(obj, new dart.InvocationImpl(displayName, core.List._check(args), {isMethod: true}));
   }
   let f = obj != null ? obj[symbol] : null;
-  let ftype = dart.getMethodType(obj, symbol);
+  let type = dart.getType(obj);
+  let ftype = dart.getMethodType(type, symbol);
   return dart._checkAndCall(f, ftype, obj, typeArgs, args, displayName);
 };
 dart.dsend = function(obj, method, ...args) {
@@ -2328,7 +2526,56 @@
 dart.copyProperties = function(to, from) {
   return dart.copyTheseProperties(to, from, dart.getOwnNamesAndSymbols(from));
 };
-dart.global = typeof window == "undefined" ? global : window;
+dart.global = (function() {
+  if (typeof NodeList !== "undefined") {
+    NodeList.prototype.get = function(i) {
+      return this[i];
+    };
+    NamedNodeMap.prototype.get = function(i) {
+      return this[i];
+    };
+    DOMTokenList.prototype.get = function(i) {
+      return this[i];
+    };
+    HTMLCollection.prototype.get = function(i) {
+      return this[i];
+    };
+    if (typeof PannerNode == "undefined") {
+      let audioContext;
+      if (typeof AudioContext == "undefined" && typeof webkitAudioContext != "undefined") {
+        audioContext = new webkitAudioContext();
+      } else {
+        audioContext = new AudioContext();
+        window.StereoPannerNode = audioContext.createStereoPanner().constructor;
+      }
+      window.PannerNode = audioContext.createPanner().constructor;
+    }
+    if (typeof AudioSourceNode == "undefined") {
+      window.AudioSourceNode = MediaElementAudioSourceNode.__proto__;
+    }
+    if (typeof FontFaceSet == "undefined") {
+      window.FontFaceSet = document.fonts.__proto__.constructor;
+    }
+    if (typeof MemoryInfo == "undefined") {
+      if (typeof window.performance.memory != "undefined") {
+        window.MemoryInfo = window.performance.memory.constructor;
+      }
+    }
+    if (typeof Geolocation == "undefined") {
+      navigator.geolocation.constructor;
+    }
+    if (typeof Animation == "undefined") {
+      let d = document.createElement('div');
+      if (typeof d.animate != "undefined") {
+        window.Animation = d.animate(d).constructor;
+      }
+    }
+    if (typeof SourceBufferList == "undefined") {
+      window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
+    }
+  }
+  return typeof window == "undefined" ? global : window;
+})();
 dart.JsSymbol = Symbol;
 dart._mixins = Symbol("mixins");
 dart.implements = Symbol("implements");
@@ -2480,196 +2727,186 @@
     this[_wrappedType] = wrappedType;
   }
   toString() {
-    return core.String._check(dart.typeName(this[_wrappedType]));
+    return dart.typeName(this[_wrappedType]);
   }
 };
 dart.setSignature(dart.WrappedType, {
   constructors: () => ({new: dart.definiteFunctionType(dart.WrappedType, [dart.dynamic])}),
   fields: () => ({[_wrappedType]: dart.dynamic})
 });
+const _stringValue = Symbol('_stringValue');
 dart.AbstractFunctionType = class AbstractFunctionType extends dart.TypeRep {
-  constructor() {
-    super();
-    this._stringValue = null;
+  new() {
+    this[_stringValue] = null;
+    super.new();
   }
   toString() {
     return this.name;
   }
   get name() {
-    if (this._stringValue) return this._stringValue;
+    if (this[_stringValue] != null) return this[_stringValue];
     let buffer = '(';
     for (let i = 0; i < this.args.length; ++i) {
       if (i > 0) {
-        buffer += ', ';
+        buffer = dart.notNull(buffer) + ', ';
       }
-      buffer += dart.typeName(this.args[i]);
+      buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.args[i]));
     }
     if (this.optionals.length > 0) {
-      if (this.args.length > 0) buffer += ', ';
-      buffer += '[';
+      if (this.args.length > 0) {
+        buffer = dart.notNull(buffer) + ', ';
+      }
+      buffer = dart.notNull(buffer) + '[';
       for (let i = 0; i < this.optionals.length; ++i) {
         if (i > 0) {
-          buffer += ', ';
+          buffer = dart.notNull(buffer) + ', ';
         }
-        buffer += dart.typeName(this.optionals[i]);
+        buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.optionals[i]));
       }
-      buffer += ']';
+      buffer = dart.notNull(buffer) + ']';
     } else if (Object.keys(this.named).length > 0) {
-      if (this.args.length > 0) buffer += ', ';
-      buffer += '{';
-      let names = dart.getOwnPropertyNames(this.named).sort();
+      if (this.args.length > 0) {
+        buffer = dart.notNull(buffer) + ', ';
+      }
+      buffer = dart.notNull(buffer) + '{';
+      let names = dart.getOwnPropertyNames(this.named);
+      names.sort();
       for (let i = 0; i < names.length; ++i) {
         if (i > 0) {
-          buffer += ', ';
+          buffer = dart.notNull(buffer) + ', ';
         }
-        buffer += names[i] + ': ' + dart.typeName(this.named[names[i]]);
+        let typeNameString = dart.typeName(this.named[names[i]]);
+        buffer = dart.notNull(buffer) + dart.str`${names[i]}: ${typeNameString}`;
       }
-      buffer += '}';
+      buffer = dart.notNull(buffer) + '}';
     }
-    buffer += ') -> ' + dart.typeName(this.returnType);
-    this._stringValue = buffer;
+    let returnTypeName = dart.typeName(this.returnType);
+    buffer = dart.notNull(buffer) + dart.str`) -> ${returnTypeName}`;
+    this[_stringValue] = buffer;
     return buffer;
   }
 };
+dart.setSignature(dart.AbstractFunctionType, {
+  constructors: () => ({new: dart.definiteFunctionType(dart.AbstractFunctionType, [])}),
+  fields: () => ({[_stringValue]: core.String})
+});
 dart._fnTypeNamedArgMap = new Map();
 dart._fnTypeArrayArgMap = new Map();
 dart._fnTypeTypeMap = new Map();
 dart._fnTypeSmallMap = [new Map(), new Map(), new Map()];
+const _process = Symbol('_process');
 dart.FunctionType = class FunctionType extends dart.AbstractFunctionType {
-  static _memoizeArray(map, arr, create) {
-    let len = arr.length;
-    map = FunctionType._lookupNonTerminal(map, len);
-    for (var i = 0; i < len - 1; ++i) {
-      map = FunctionType._lookupNonTerminal(map, arr[i]);
-    }
-    let result = map.get(arr[len - 1]);
-    if (result !== void 0) return result;
-    map.set(arr[len - 1], result = create());
-    return result;
-  }
-  static _normalizeParameter(a) {
-    if (a instanceof Array) {
-      let result = [];
-      result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
-      result.push(a.slice(1));
-      return result;
-    }
-    return a == dart.dynamic ? dart.bottom : a;
-  }
-  static _canonicalizeArray(definite, array, map) {
-    let arr = definite ? array : array.map(FunctionType._normalizeParameter);
-    return FunctionType._memoizeArray(map, arr, () => arr);
-  }
-  static _canonicalizeNamed(definite, named, map) {
-    let key = [];
-    let names = dart.getOwnPropertyNames(named);
-    let r = {};
-    for (var i = 0; i < names.length; ++i) {
-      let name = names[i];
-      let type = named[name];
-      if (!definite) r[name] = type = FunctionType._normalizeParameter(type);
-      key.push(name);
-      key.push(type);
-    }
-    if (!definite) named = r;
-    return FunctionType._memoizeArray(map, key, () => named);
-  }
-  static _lookupNonTerminal(map, key) {
-    let result = map.get(key);
-    if (result !== void 0) return result;
-    map.set(key, result = new Map());
-    return result;
-  }
-  static _createSmall(count, definite, returnType, required) {
-    let map = dart._fnTypeSmallMap[count];
-    let args = definite ? required : required.map(FunctionType._normalizeParameter);
-    for (var i = 0; i < count; ++i) {
-      map = FunctionType._lookupNonTerminal(map, args[i]);
-    }
-    let result = map.get(returnType);
-    if (result !== void 0) return result;
-    result = new FunctionType(returnType, args, [], {});
-    map.set(returnType, result);
-    return result;
-  }
   static create(definite, returnType, args, extra) {
     if (extra === void 0 && args.length < 3) {
-      return FunctionType._createSmall(args.length, definite, returnType, args);
+      return dart._createSmall(args.length, definite, returnType, args);
     }
-    args = FunctionType._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
-    let keys;
-    let create;
+    args = dart._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
+    let keys = null;
+    let create = null;
     if (extra === void 0) {
       keys = [returnType, args];
-      create = () => new FunctionType(returnType, args, [], {});
+      create = dart.fn(() => new dart.FunctionType(returnType, args, [], {}), VoidToFunctionType());
     } else if (extra instanceof Array) {
-      let optionals = FunctionType._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
+      let optionals = dart._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
       keys = [returnType, args, optionals];
-      create = () => new FunctionType(returnType, args, optionals, {});
+      create = dart.fn(() => new dart.FunctionType(returnType, args, optionals, {}), VoidToFunctionType());
     } else {
-      let named = FunctionType._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
+      let named = dart._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
       keys = [returnType, args, named];
-      create = () => new FunctionType(returnType, args, [], named);
+      create = dart.fn(() => new dart.FunctionType(returnType, args, [], named), VoidToFunctionType());
     }
-    return FunctionType._memoizeArray(dart._fnTypeTypeMap, keys, create);
+    return dart._memoizeArray(dart._fnTypeTypeMap, keys, create);
   }
-  constructor(returnType, args, optionals, named) {
-    super();
+  [_process](array, metadata) {
+    let result = [];
+    for (let i = 0; i < array.length; ++i) {
+      let arg = array[i];
+      if (arg instanceof Array) {
+        dart.dsend(metadata, 'add', arg.slice(1));
+        result[dartx.add](arg[0]);
+      } else {
+        metadata.push([]);
+        result.push(arg);
+      }
+    }
+    return result;
+  }
+  new(returnType, args, optionals, named) {
     this.returnType = returnType;
     this.args = args;
     this.optionals = optionals;
     this.named = named;
+    this.metadata = null;
+    super.new();
     this.metadata = [];
-    function process(array, metadata) {
-      var result = [];
-      for (var i = 0; i < array.length; ++i) {
-        var arg = array[i];
-        if (arg instanceof Array) {
-          metadata.push(arg.slice(1));
-          result.push(arg[0]);
-        } else {
-          metadata.push([]);
-          result.push(arg);
-        }
-      }
-      return result;
-    }
-    this.args = process(this.args, this.metadata);
-    this.optionals = process(this.optionals, this.metadata);
+    this.args = this[_process](this.args, this.metadata);
+    this.optionals = this[_process](this.optionals, this.metadata);
   }
 };
+dart.setSignature(dart.FunctionType, {
+  constructors: () => ({new: dart.definiteFunctionType(dart.FunctionType, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+  fields: () => ({
+    returnType: dart.dynamic,
+    args: dart.dynamic,
+    optionals: dart.dynamic,
+    named: dart.dynamic,
+    metadata: dart.dynamic
+  }),
+  methods: () => ({[_process]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])}),
+  statics: () => ({create: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+  names: ['create']
+});
+const _name = Symbol('_name');
+const _closure = Symbol('_closure');
+const _functionType = Symbol('_functionType');
 dart.Typedef = class Typedef extends dart.AbstractFunctionType {
-  constructor(name, closure) {
-    super();
-    this._name = name;
-    this._closure = closure;
-    this._functionType = null;
+  new(name, closure) {
+    this[_name] = name;
+    this[_closure] = closure;
+    this[_functionType] = null;
+    super.new();
   }
   get name() {
-    return this._name;
+    return core.String._check(this[_name]);
   }
   get functionType() {
-    if (!this._functionType) {
-      this._functionType = this._closure();
+    if (this[_functionType] == null) {
+      this[_functionType] = this[_closure]();
     }
-    return this._functionType;
+    return this[_functionType];
   }
   get returnType() {
     return this.functionType.returnType;
   }
   get args() {
-    return this.functionType.args;
+    return core.List._check(this.functionType.args);
   }
   get optionals() {
-    return this.functionType.optionals;
+    return core.List._check(this.functionType.optionals);
   }
   get named() {
     return this.functionType.named;
   }
   get metadata() {
-    return this.functionType.metadata;
+    return core.List._check(this.functionType.metadata);
   }
 };
+dart.setSignature(dart.Typedef, {
+  constructors: () => ({new: dart.definiteFunctionType(dart.Typedef, [dart.dynamic, dart.dynamic])}),
+  fields: () => ({
+    [_name]: dart.dynamic,
+    [_closure]: dart.dynamic,
+    [_functionType]: dart.AbstractFunctionType
+  }),
+  getters: () => ({
+    functionType: dart.definiteFunctionType(dart.AbstractFunctionType, []),
+    returnType: dart.definiteFunctionType(dart.dynamic, []),
+    args: dart.definiteFunctionType(core.List, []),
+    optionals: dart.definiteFunctionType(core.List, []),
+    named: dart.definiteFunctionType(dart.dynamic, []),
+    metadata: dart.definiteFunctionType(core.List, [])
+  })
+});
 dart._typeFormalCount = Symbol("_typeFormalCount");
 dart.isSubtype = dart._subtypeMemo((t1, t2) => t1 === t2 || dart._isSubtype(t1, t2, true));
 dart._trapRuntimeErrors = true;
@@ -2805,7 +3042,7 @@
   }
 };
 dart.setSignature(dart.InvocationImpl, {
-  constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [core.String, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
+  constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [dart.dynamic, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
   fields: () => ({
     memberName: core.Symbol,
     positionalArguments: core.List,
@@ -2949,8 +3186,8 @@
 dart.lazyFn(_debugger.getObjectTypeName, () => dynamicToString());
 _debugger.getTypeName = function(type) {
   let name = dart.typeName(type);
-  if (dart.equals(name, 'JSArray<dynamic>') || dart.equals(name, 'JSObject<Array>')) return 'List<dynamic>';
-  return core.String._check(name);
+  if (name == 'JSArray<dynamic>' || name == 'JSObject<Array>') return 'List<dynamic>';
+  return name;
 };
 dart.lazyFn(_debugger.getTypeName, () => TypeToString());
 _debugger._getType = function(object) {
@@ -3498,7 +3735,7 @@
     return true;
   }
   preview(object) {
-    return core.String._check(dart.typeName(dart.getReifiedType(object)));
+    return dart.typeName(dart.getReifiedType(object));
   }
   children(object) {
     return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'signature', value: this.preview(object)}), new _debugger.NameValuePair({name: 'JavaScript Function', value: object, config: _debugger.JsonMLConfig.skipDart})]);
@@ -7209,30 +7446,8 @@
   ListIterable[dart.implements] = () => [_internal.EfficientLength];
   dart.setSignature(ListIterable, {
     constructors: () => ({new: dart.definiteFunctionType(_internal.ListIterable$(E), [])}),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, []),
-      single: dart.definiteFunctionType(E, [])
-    }),
-    methods: () => ({
-      forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-      every: dart.definiteFunctionType(core.bool, [ETobool()]),
-      any: dart.definiteFunctionType(core.bool, [ETobool()]),
-      firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-      lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-      singleWhere: dart.definiteFunctionType(E, [ETobool()]),
-      where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-      map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-      reduce: dart.definiteFunctionType(E, [dynamicAndEToE()]),
-      fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-      skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-      skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-      take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-      takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-      toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-      toSet: dart.definiteFunctionType(core.Set$(E), [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+    methods: () => ({reduce: dart.definiteFunctionType(E, [dynamicAndEToE()])})
   });
   dart.defineExtensionMembers(ListIterable, [
     'forEach',
@@ -7358,12 +7573,6 @@
     getters: () => ({
       [_endIndex]: dart.definiteFunctionType(core.int, []),
       [_startIndex]: dart.definiteFunctionType(core.int, [])
-    }),
-    methods: () => ({
-      elementAt: dart.definiteFunctionType(E, [core.int]),
-      skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-      take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-      toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool})
     })
   });
   dart.defineExtensionMembers(SubListIterable, [
@@ -7478,13 +7687,7 @@
       [_iterable]: IterableOfS(),
       [_f]: _TransformationOfS$T()
     }),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(T), []),
-      first: dart.definiteFunctionType(T, []),
-      last: dart.definiteFunctionType(T, []),
-      single: dart.definiteFunctionType(T, [])
-    }),
-    methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(T), [])})
   });
   dart.defineExtensionMembers(MappedIterable, [
     'elementAt',
@@ -7577,8 +7780,7 @@
     fields: () => ({
       [_source]: IterableOfS(),
       [_f]: _TransformationOfS$T()
-    }),
-    methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+    })
   });
   dart.defineExtensionMembers(MappedListIterable, ['elementAt', 'length']);
   return MappedListIterable;
@@ -7927,8 +8129,7 @@
       [_iterable]: IterableOfE(),
       [_skipCount]: core.int
     }),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-    methods: () => ({skip: dart.definiteFunctionType(core.Iterable$(E), [core.int])})
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
   });
   dart.defineExtensionMembers(SkipIterable, ['skip', 'iterator']);
   return SkipIterable;
@@ -8154,31 +8355,8 @@
   EmptyIterable[dart.implements] = () => [_internal.EfficientLength];
   dart.setSignature(EmptyIterable, {
     constructors: () => ({new: dart.definiteFunctionType(_internal.EmptyIterable$(E), [])}),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, []),
-      single: dart.definiteFunctionType(E, [])
-    }),
-    methods: () => ({
-      forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-      elementAt: dart.definiteFunctionType(E, [core.int]),
-      every: dart.definiteFunctionType(core.bool, [ETobool()]),
-      any: dart.definiteFunctionType(core.bool, [ETobool()]),
-      firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-      lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-      singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-      where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-      map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-      reduce: dart.definiteFunctionType(E, [EAndEToE()]),
-      fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-      skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-      skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-      take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-      takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-      toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-      toSet: dart.definiteFunctionType(core.Set$(E), [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+    methods: () => ({singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()})})
   });
   dart.defineExtensionMembers(EmptyIterable, [
     'forEach',
@@ -8377,8 +8555,7 @@
 dart.addSimpleTypeTests(_internal._ListIndicesIterable);
 dart.setSignature(_internal._ListIndicesIterable, {
   constructors: () => ({new: dart.definiteFunctionType(_internal._ListIndicesIterable, [core.List])}),
-  fields: () => ({[_backedList]: core.List}),
-  methods: () => ({elementAt: dart.definiteFunctionType(core.int, [core.int])})
+  fields: () => ({[_backedList]: core.List})
 });
 dart.defineExtensionMembers(_internal._ListIndicesIterable, ['elementAt', 'length']);
 const _values = Symbol('_values');
@@ -8507,8 +8684,7 @@
   }
   dart.setSignature(ReversedListIterable, {
     constructors: () => ({new: dart.definiteFunctionType(_internal.ReversedListIterable$(E), [IterableOfE()])}),
-    fields: () => ({[_source]: IterableOfE()}),
-    methods: () => ({elementAt: dart.definiteFunctionType(E, [core.int])})
+    fields: () => ({[_source]: IterableOfE()})
   });
   dart.defineExtensionMembers(ReversedListIterable, ['elementAt', 'length']);
   return ReversedListIterable;
@@ -9676,7 +9852,7 @@
     let replyPort = dart.dindex(msg, 'replyPort');
     _isolate_helper.IsolateNatives.spawn(core.String._check(dart.dindex(msg, 'functionName')), core.String._check(dart.dindex(msg, 'uri')), ListOfString()._check(dart.dindex(msg, 'args')), dart.dindex(msg, 'msg'), false, core.bool._check(dart.dindex(msg, 'isSpawnUri')), core.bool._check(dart.dindex(msg, 'startPaused'))).then(dart.dynamic)(dart.fn(msg => {
       dart.dsend(replyPort, 'send', msg);
-    }, ListTodynamic()), {onError: dart.fn(errorMessage => {
+    }, ListToFutureOr()), {onError: dart.fn(errorMessage => {
         dart.dsend(replyPort, 'send', JSArrayOfString().of([_isolate_helper._SPAWN_FAILED_SIGNAL, errorMessage]));
       }, StringTodynamic())});
   }
@@ -9735,7 +9911,7 @@
         dart.assert(dart.equals(dart.dindex(msg, 0), _isolate_helper._SPAWN_FAILED_SIGNAL));
         completer.completeError(dart.dindex(msg, 1));
       }
-    }, dynamicTodynamic()));
+    }, dynamicToFutureOr()));
     let signalReply = port.sendPort;
     if (dart.test(_isolate_helper._globalState.useWorkers) && !dart.test(isLight)) {
       _isolate_helper.IsolateNatives._startWorker(functionName, uri, args, message, isSpawnUri, startPaused, signalReply, dart.fn(message => completer.completeError(message), StringTovoid()));
@@ -10074,6 +10250,7 @@
   let IterableOfT = () => (IterableOfT = dart.constFn(core.Iterable$(T)))();
   let intToT = () => (intToT = dart.constFn(dart.functionType(T, [core.int])))();
   let EventSinkOfTToEventSink = () => (EventSinkOfTToEventSink = dart.constFn(dart.functionType(async.EventSink, [EventSinkOfT()])))();
+  let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
   let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
   let VoidTo_IterablePendingEventsOfT = () => (VoidTo_IterablePendingEventsOfT = dart.constFn(dart.definiteFunctionType(_IterablePendingEventsOfT(), [])))();
   let TTovoid$ = () => (TTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [T])))();
@@ -10091,7 +10268,7 @@
       future.then(dart.dynamic)(dart.fn(value => {
         controller[_add](value);
         controller[_closeUnchecked]();
-      }, TTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+      }, TToFutureOr()), {onError: dart.fn((error, stackTrace) => {
           controller[_addError](error, core.StackTrace._check(stackTrace));
           controller[_closeUnchecked]();
         }, dynamicAnddynamicTodynamic())});
@@ -10213,7 +10390,7 @@
 
             if (async.Future.is(newValue)) {
               subscription.pause();
-              newValue.then(dart.dynamic)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
+              newValue.then(dart.void)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
             } else {
               controller.add(E.as(newValue));
             }
@@ -12675,12 +12852,6 @@
       return new Map();
     }
   }
-  dart.setSignature(Es6LinkedHashMap, {
-    methods: () => ({
-      [_getTableCell]: dart.definiteFunctionType(_js_helper.LinkedHashMapCell$(K, V), [dart.dynamic, dart.dynamic]),
-      [_getTableBucket]: dart.definiteFunctionType(core.List$(_js_helper.LinkedHashMapCell$(K, V)), [dart.dynamic, dart.dynamic])
-    })
-  });
   return Es6LinkedHashMap;
 });
 _js_helper.Es6LinkedHashMap = Es6LinkedHashMap();
@@ -12745,8 +12916,7 @@
   dart.setSignature(LinkedHashMapKeyIterable, {
     constructors: () => ({new: dart.definiteFunctionType(_js_helper.LinkedHashMapKeyIterable$(E), [JsLinkedHashMapOfE$dynamic()])}),
     fields: () => ({[_map]: JsLinkedHashMapOfE$dynamic()}),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-    methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
   });
   dart.defineExtensionMembers(LinkedHashMapKeyIterable, [
     'contains',
@@ -13194,10 +13364,7 @@
     [_pattern]: core.String,
     [_index]: core.int
   }),
-  getters: () => ({
-    iterator: dart.definiteFunctionType(core.Iterator$(core.Match), []),
-    first: dart.definiteFunctionType(core.Match, [])
-  })
+  getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(core.Match), [])})
 });
 dart.defineExtensionMembers(_js_helper._StringAllMatchesIterable, ['iterator', 'first']);
 _js_helper._StringAllMatchesIterator = class _StringAllMatchesIterator extends core.Object {
@@ -13512,7 +13679,31 @@
   if (privateSymbol != null) {
     return privateSymbol;
   }
-  return _js_mirrors.getName(symbol);
+  let name = _js_mirrors.getName(symbol);
+  switch (name) {
+    case '[]':
+    {
+      name = '_get';
+      break;
+    }
+    case '[]=':
+    {
+      name = '_set';
+      break;
+    }
+    case 'unary-':
+    {
+      name = '_negate';
+      break;
+    }
+    case 'constructor':
+    case 'prototype':
+    {
+      name = dart.str`_${name}`;
+      break;
+    }
+  }
+  return name;
 };
 dart.lazyFn(_js_mirrors._getMember, () => SymbolTodynamic());
 _js_mirrors._getNameForESSymbol = function(member) {
@@ -15142,8 +15333,7 @@
   }),
   methods: () => ({
     _get: dart.definiteFunctionType(typed_data.Float32x4, [core.int]),
-    _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4]),
-    sublist: dart.definiteFunctionType(core.List$(typed_data.Float32x4), [core.int], [core.int])
+    _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4])
   })
 });
 dart.defineExtensionMembers(_native_typed_data.NativeFloat32x4List, [
@@ -15775,8 +15965,7 @@
   }),
   methods: () => ({
     _get: dart.definiteFunctionType(typed_data.Int32x4, [core.int]),
-    _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4]),
-    sublist: dart.definiteFunctionType(core.List$(typed_data.Int32x4), [core.int], [core.int])
+    _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4])
   })
 });
 dart.defineExtensionMembers(_native_typed_data.NativeInt32x4List, [
@@ -15892,8 +16081,7 @@
   }),
   methods: () => ({
     _get: dart.definiteFunctionType(typed_data.Float64x2, [core.int]),
-    _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2]),
-    sublist: dart.definiteFunctionType(core.List$(typed_data.Float64x2), [core.int], [core.int])
+    _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2])
   })
 });
 dart.defineExtensionMembers(_native_typed_data.NativeFloat64x2List, [
@@ -16258,8 +16446,7 @@
   getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
   methods: () => ({
     _get: dart.definiteFunctionType(core.double, [core.int]),
-    _set: dart.definiteFunctionType(dart.void, [core.int, core.num]),
-    setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfdouble()], [core.int])
+    _set: dart.definiteFunctionType(dart.void, [core.int, core.num])
   })
 });
 dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfDouble, ['_get', '_set', 'setRange', 'length']);
@@ -16292,10 +16479,7 @@
 _native_typed_data.NativeTypedArrayOfInt[dart.implements] = () => [ListOfint()];
 dart.setSignature(_native_typed_data.NativeTypedArrayOfInt, {
   getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
-  methods: () => ({
-    _set: dart.definiteFunctionType(dart.void, [core.int, core.int]),
-    setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfint()], [core.int])
-  })
+  methods: () => ({_set: dart.definiteFunctionType(dart.void, [core.int, core.int])})
 });
 dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfInt, ['_set', 'setRange', 'length']);
 dart.defineExtensionNames([
@@ -16339,7 +16523,6 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [ListOfdouble()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic, dart.dynamic]),
@@ -16389,7 +16572,6 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [ListOfdouble()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic, dart.dynamic]),
@@ -16444,10 +16626,7 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [ListOfint()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [_native_typed_data.NativeByteBuffer, core.int, core.int])
   }),
-  methods: () => ({
-    [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-    [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-  }),
+  methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic, dart.dynamic]),
@@ -16502,10 +16681,7 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [ListOfint()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({
-    [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-    [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-  }),
+  methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic, dart.dynamic]),
@@ -16560,10 +16736,7 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [ListOfint()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({
-    [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-    [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-  }),
+  methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic, dart.dynamic]),
@@ -16618,10 +16791,7 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [ListOfint()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({
-    [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-    [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-  }),
+  methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic, dart.dynamic]),
@@ -16676,10 +16846,7 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [ListOfint()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({
-    [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-    [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-  }),
+  methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic, dart.dynamic]),
@@ -16741,10 +16908,7 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [ListOfint()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({
-    [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-    [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-  }),
+  methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic, dart.dynamic]),
@@ -16807,10 +16971,7 @@
     fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [ListOfint()]),
     view: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [typed_data.ByteBuffer, core.int, core.int])
   }),
-  methods: () => ({
-    [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-    [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-  }),
+  methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
   statics: () => ({
     _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic]),
     _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic, dart.dynamic]),
@@ -17624,10 +17785,7 @@
   dart.setSignature(_ControllerStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._ControllerStream$(T), [_StreamControllerLifecycleOfT()])}),
     fields: () => ({[_controller]: _StreamControllerLifecycleOfT()}),
-    methods: () => ({
-      [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-      '==': dart.definiteFunctionType(core.bool, [core.Object])
-    })
+    methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])})
   });
   return _ControllerStream;
 });
@@ -17732,7 +17890,7 @@
     }
     onDone(handleDone) {
       if (handleDone == null) handleDone = async._nullDoneHandler;
-      this[_onDone] = this[_zone].registerCallback(dart.dynamic)(handleDone);
+      this[_onDone] = this[_zone].registerCallback(dart.void)(handleDone);
     }
     pause(resumeSignal) {
       if (resumeSignal === void 0) resumeSignal = null;
@@ -17885,7 +18043,7 @@
       dart.assert(!dart.test(this[_inCallback]));
       let wasInputPaused = this[_isInputPaused];
       this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-      this[_zone].runUnaryGuarded(dart.dynamic, T)(this[_onData], data);
+      this[_zone].runUnaryGuarded(dart.void, T)(this[_onData], data);
       this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
       this[_checkState](wasInputPaused);
     }
@@ -17926,7 +18084,7 @@
       const sendDone = (function() {
         if (!dart.test(this[_waitsForCancel])) return;
         this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_CANCELED | async._BufferingStreamSubscription._STATE_CLOSED | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-        this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+        this[_zone].runGuarded(dart.void)(this[_onDone]);
         this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
       }).bind(this);
       dart.fn(sendDone, VoidTovoid());
@@ -18619,10 +18777,7 @@
     constructors: () => ({new: dart.definiteFunctionType(async._AsBroadcastStreamController$(T), [VoidTovoid(), VoidTovoid()])}),
     fields: () => ({[_pending]: _StreamImplEventsOfT()}),
     getters: () => ({[_hasPending]: dart.definiteFunctionType(core.bool, [])}),
-    methods: () => ({
-      [_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent]),
-      add: dart.definiteFunctionType(dart.void, [T])
-    })
+    methods: () => ({[_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent])})
   });
   return _AsBroadcastStreamController;
 });
@@ -18641,7 +18796,7 @@
     onDone(handleDone) {}
     pause(resumeSignal) {
       if (resumeSignal === void 0) resumeSignal = null;
-      if (resumeSignal != null) resumeSignal.then(dart.dynamic)(dart.bind(this, _resume));
+      if (resumeSignal != null) resumeSignal.then(dart.void)(dart.bind(this, _resume));
       this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1;
     }
     resume() {
@@ -18716,6 +18871,20 @@
   constructors: () => ({new: dart.definiteFunctionType(async.DeferredLoadException, [core.String])}),
   fields: () => ({[_s]: core.String})
 });
+async.FutureOr$ = dart.generic(T => {
+  class FutureOr extends core.Object {
+    _() {
+      dart.throw(new core.UnsupportedError("FutureOr can't be instantiated"));
+    }
+  }
+  dart.addTypeTests(FutureOr);
+  dart.defineNamedConstructor(FutureOr, '_');
+  dart.setSignature(FutureOr, {
+    constructors: () => ({_: dart.definiteFunctionType(async.FutureOr$(T), [])})
+  });
+  return FutureOr;
+});
+async.FutureOr = FutureOr();
 const _completeWithValue = Symbol('_completeWithValue');
 let const;
 async.Future$ = dart.flattenFutures(dart.generic(T => {
@@ -18779,7 +18948,7 @@
       let result = new (_FutureOfT())();
       async.Timer.new(duration, dart.fn(() => {
         try {
-          result[_complete](computation == null ? null : computation());
+          result[_complete](dart.nullSafe(computation, _ => _()));
         } catch (e) {
           let s = dart.stackTrace(e);
           async._completeWithErrorCallback(result, e, s);
@@ -18821,31 +18990,43 @@
           }
         }
         dart.fn(handleError, dynamicAnddynamicTovoid());
-        for (let future of futures) {
-          let pos = remaining++;
-          future.then(dart.dynamic)(dart.fn(value => {
-            remaining--;
-            if (values != null) {
-              values[dartx._set](pos, value);
-              if (remaining == 0) {
-                result[_completeWithValue](values);
+        try {
+          for (let future of futures) {
+            let pos = remaining;
+            future.then(dart.dynamic)(dart.fn(value => {
+              remaining--;
+              if (values != null) {
+                values[dartx._set](pos, value);
+                if (remaining == 0) {
+                  result[_completeWithValue](values);
+                }
+              } else {
+                if (cleanUp != null && value != null) {
+                  async.Future.sync(dart.fn(() => {
+                    cleanUp(value);
+                  }, VoidTodynamic()));
+                }
+                if (remaining == 0 && !dart.test(eagerError)) {
+                  result[_completeError](error, stackTrace);
+                }
               }
-            } else {
-              if (cleanUp != null && value != null) {
-                async.Future.sync(dart.fn(() => {
-                  cleanUp(value);
-                }, VoidTodynamic()));
-              }
-              if (remaining == 0 && !dart.test(eagerError)) {
-                result[_completeError](error, stackTrace);
-              }
-            }
-          }, dart.definiteFunctionType(dart.dynamic, [T])), {onError: handleError});
+            }, dart.definiteFunctionType(async.FutureOr, [T])), {onError: handleError});
+            remaining++;
+          }
+          if (remaining == 0) {
+            return async.Future$(core.List$(T)).value(const || (const = dart.constList([], dart.dynamic)));
+          }
+          values = core.List$(T).new(remaining);
+        } catch (e) {
+          let st = dart.stackTrace(e);
+          if (remaining == 0 || dart.test(eagerError)) {
+            return async.Future$(core.List$(T)).error(e, st);
+          } else {
+            error = e;
+            stackTrace = st;
+          }
         }
-        if (remaining == 0) {
-          return async.Future$(core.List$(T)).value(const || (const = dart.constList([], dart.dynamic)));
-        }
-        values = core.List$(T).new(remaining);
+
         return result;
       };
     }
@@ -18876,7 +19057,7 @@
       let nextIteration = null;
       nextIteration = async.Zone.current.bindUnaryCallback(dart.dynamic, core.bool)(dart.fn(keepGoing => {
         if (dart.test(keepGoing)) {
-          async.Future.sync(f).then(dart.dynamic)(dynamicTodynamic()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
+          async.Future.sync(f).then(dart.dynamic)(dynamicToFutureOr()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
         } else {
           doneSignal[_complete](null);
         }
@@ -19217,6 +19398,7 @@
 const _setChained = Symbol('_setChained');
 const _thenNoZoneRegistration = Symbol('_thenNoZoneRegistration');
 const _setPendingComplete = Symbol('_setPendingComplete');
+const _clearPendingComplete = Symbol('_clearPendingComplete');
 const _error = Symbol('_error');
 const _chainSource = Symbol('_chainSource');
 const _setValue = Symbol('_setValue');
@@ -19232,7 +19414,7 @@
   let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
   let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))();
   let TTodynamic = () => (TTodynamic = dart.constFn(dart.functionType(dart.dynamic, [T])))();
-  let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
+  let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
   class _Future extends core.Object {
     new() {
       this[_zone] = async.Zone.current;
@@ -19281,7 +19463,7 @@
         let currentZone = async.Zone.current;
         let registered = null;
         if (!core.identical(currentZone, async._ROOT_ZONE)) {
-          f = currentZone.registerUnaryCallback(dart.dynamic, T)(f);
+          f = currentZone.registerUnaryCallback(async.FutureOr$(E), T)(f);
           if (onError != null) {
             onError = async._registerErrorHandler(T)(onError, currentZone);
           }
@@ -19321,6 +19503,10 @@
       dart.assert(this[_mayComplete]);
       this[_state] = async._Future._PENDING_COMPLETE;
     }
+    [_clearPendingComplete]() {
+      dart.assert(this[_isPendingComplete]);
+      this[_state] = async._Future._INCOMPLETE;
+    }
     get [_error]() {
       dart.assert(this[_hasError]);
       return async.AsyncError._check(this[_resultOrListeners]);
@@ -19421,8 +19607,9 @@
       try {
         source.then(dart.dynamic)(dart.fn(value => {
           dart.assert(target[_isPendingComplete]);
-          target[_completeWithValue](value);
-        }, dynamicTodynamic()), {onError: dart.fn((error, stackTrace) => {
+          target[_clearPendingComplete]();
+          target[_complete](value);
+        }, dynamicToFutureOr()), {onError: dart.fn((error, stackTrace) => {
             if (stackTrace === void 0) stackTrace = null;
             dart.assert(target[_isPendingComplete]);
             target[_completeError](error, core.StackTrace._check(stackTrace));
@@ -19672,7 +19859,7 @@
           timer.cancel();
           result[_completeWithValue](v);
         }
-      }, TTodynamic$()), {onError: dart.fn((e, s) => {
+      }, TToFutureOr()), {onError: dart.fn((e, s) => {
           if (dart.test(timer.isActive)) {
             timer.cancel();
             result[_completeError](e, core.StackTrace._check(s));
@@ -19708,12 +19895,13 @@
     }),
     methods: () => ({
       [_setChained]: dart.definiteFunctionType(dart.void, [async._Future]),
-      then: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic()], {onError: core.Function}]),
+      then: dart.definiteFunctionType(E => [async.Future$(E), [dart.functionType(async.FutureOr$(E), [T])], {onError: core.Function}]),
       [_thenNoZoneRegistration]: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic(), core.Function]]),
       catchError: dart.definiteFunctionType(async.Future$(T), [core.Function], {test: dynamicTobool()}),
       whenComplete: dart.definiteFunctionType(async.Future$(T), [VoidTodynamic()]),
       asStream: dart.definiteFunctionType(async.Stream$(T), []),
       [_setPendingComplete]: dart.definiteFunctionType(dart.void, []),
+      [_clearPendingComplete]: dart.definiteFunctionType(dart.void, []),
       [_setValue]: dart.definiteFunctionType(dart.void, [T]),
       [_setErrorObject]: dart.definiteFunctionType(dart.void, [async.AsyncError]),
       [_setError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace]),
@@ -19834,10 +20022,10 @@
   }
   let implementation = currentZone[_scheduleMicrotask];
   if (core.identical(async._ROOT_ZONE, implementation.zone) && dart.test(async._ROOT_ZONE.inSameErrorZone(currentZone))) {
-    async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.dynamic)(callback));
+    async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.void)(callback));
     return;
   }
-  async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+  async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
 };
 dart.fn(async.scheduleMicrotask, _AsyncCallbackTovoid());
 async._AsyncRun = class _AsyncRun extends core.Object {
@@ -19957,10 +20145,7 @@
   dart.setSignature(StreamView, {
     constructors: () => ({new: dart.definiteFunctionType(async.StreamView$(T), [StreamOfT()])}),
     fields: () => ({[_stream]: StreamOfT()}),
-    methods: () => ({
-      asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-      listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-    })
+    methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
   });
   return StreamView;
 });
@@ -20665,8 +20850,7 @@
     fields: () => ({
       [_pending]: _EventGeneratorOfT(),
       [_isUsed]: core.bool
-    }),
-    methods: () => ({[_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool])})
+    })
   });
   return _GeneratedStreamImpl;
 });
@@ -21014,7 +21198,7 @@
       this[_state] = (dart.notNull(this[_state]) & ~async._DoneStreamSubscription._SCHEDULED) >>> 0;
       if (dart.test(this.isPaused)) return;
       this[_state] = (dart.notNull(this[_state]) | async._DoneStreamSubscription._DONE_SENT) >>> 0;
-      if (this[_onDone] != null) this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+      if (this[_onDone] != null) this[_zone].runGuarded(dart.void)(this[_onDone]);
     }
   }
   dart.addTypeTests(_DoneStreamSubscription);
@@ -21099,7 +21283,7 @@
     [_onCancel]() {
       let shutdown = this[_controller] == null || dart.test(this[_controller].isClosed);
       if (this[_onCancelHandler] != null) {
-        this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+        this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
       }
       if (shutdown) {
         if (this[_subscription] != null) {
@@ -21110,7 +21294,7 @@
     }
     [_onListen]() {
       if (this[_onListenHandler] != null) {
-        this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+        this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
       }
     }
     [_cancelSubscription]() {
@@ -21545,7 +21729,6 @@
       [_subscription]: StreamSubscriptionOfS()
     }),
     methods: () => ({
-      [_add]: dart.definiteFunctionType(dart.void, [T]),
       [_handleData]: dart.definiteFunctionType(dart.void, [S]),
       [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace]),
       [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -21597,8 +21780,7 @@
   }
   dart.setSignature(_WhereStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._WhereStream$(T), [StreamOfT(), _PredicateOfT()])}),
-    fields: () => ({[_test]: _PredicateOfT()}),
-    methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+    fields: () => ({[_test]: _PredicateOfT()})
   });
   return _WhereStream;
 });
@@ -21635,8 +21817,7 @@
   }
   dart.setSignature(_MapStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._MapStream$(S, T), [StreamOfS(), _TransformationOfS$T()])}),
-    fields: () => ({[_transform]: _TransformationOfS$T()}),
-    methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+    fields: () => ({[_transform]: _TransformationOfS$T()})
   });
   return _MapStream;
 });
@@ -21668,8 +21849,7 @@
   }
   dart.setSignature(_ExpandStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._ExpandStream$(S, T), [StreamOfS(), _TransformationOfS$IterableOfT()])}),
-    fields: () => ({[_expand]: _TransformationOfS$IterableOfT()}),
-    methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+    fields: () => ({[_expand]: _TransformationOfS$IterableOfT()})
   });
   return _ExpandStream;
 });
@@ -21758,11 +21938,7 @@
   }
   dart.setSignature(_TakeStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._TakeStream$(T), [StreamOfT(), core.int])}),
-    fields: () => ({[_count]: core.int}),
-    methods: () => ({
-      [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-      [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-    })
+    fields: () => ({[_count]: core.int})
   });
   return _TakeStream;
 });
@@ -21836,8 +22012,7 @@
   }
   dart.setSignature(_TakeWhileStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._TakeWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-    fields: () => ({[_test]: _PredicateOfT()}),
-    methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+    fields: () => ({[_test]: _PredicateOfT()})
   });
   return _TakeWhileStream;
 });
@@ -21870,11 +22045,7 @@
   }
   dart.setSignature(_SkipStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._SkipStream$(T), [StreamOfT(), core.int])}),
-    fields: () => ({[_count]: core.int}),
-    methods: () => ({
-      [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-      [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-    })
+    fields: () => ({[_count]: core.int})
   });
   return _SkipStream;
 });
@@ -21920,11 +22091,7 @@
   }
   dart.setSignature(_SkipWhileStream, {
     constructors: () => ({new: dart.definiteFunctionType(async._SkipWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-    fields: () => ({[_test]: _PredicateOfT()}),
-    methods: () => ({
-      [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-      [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-    })
+    fields: () => ({[_test]: _PredicateOfT()})
   });
   return _SkipWhileStream;
 });
@@ -21978,7 +22145,6 @@
       [_equals]: _EqualityOfT(),
       [_previous]: core.Object
     }),
-    methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])}),
     sfields: () => ({_SENTINEL: core.Object})
   });
   return _DistinctStream;
@@ -22119,7 +22285,6 @@
     }),
     getters: () => ({[_isSubscribed]: dart.definiteFunctionType(core.bool, [])}),
     methods: () => ({
-      [_add]: dart.definiteFunctionType(dart.void, [T]),
       [_handleData]: dart.definiteFunctionType(dart.void, [S]),
       [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic], [dart.dynamic]),
       [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -22287,7 +22452,6 @@
   }
   dart.setSignature(_StreamHandlerTransformer, {
     constructors: () => ({new: dart.definiteFunctionType(async._StreamHandlerTransformer$(S, T), [], {handleData: SAndEventSinkOfTTovoid(), handleError: ObjectAndStackTraceAndEventSinkOfTTovoid(), handleDone: EventSinkOfTTovoid()})}),
-    methods: () => ({bind: dart.definiteFunctionType(async.Stream$(T), [StreamOfS()])}),
     statics: () => ({
       _defaultHandleData: dart.definiteFunctionType(dart.void, [dart.dynamic, async.EventSink]),
       _defaultHandleError: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace, async.EventSink]),
@@ -22366,7 +22530,7 @@
     if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
       return async.Zone.current.createTimer(duration, callback);
     }
-    return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+    return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
   }
   static periodic(duration, callback) {
     if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
@@ -23105,7 +23269,7 @@
 dart.fn(async._rootScheduleMicrotask, ZoneAndZoneDelegateAndZone__Tovoid());
 async._rootCreateTimer = function(self, parent, zone, duration, callback) {
   if (!core.identical(async._ROOT_ZONE, zone)) {
-    callback = zone.bindCallback(dart.dynamic)(callback);
+    callback = zone.bindCallback(dart.void)(callback);
   }
   return async.Timer._createTimer(duration, callback);
 };
@@ -23868,11 +24032,6 @@
       [_equals]: _EqualityOfK(),
       [_hashCode]: _HasherOfK(),
       [_validKey]: _PredicateOfObject()
-    }),
-    methods: () => ({
-      _get: dart.definiteFunctionType(V, [core.Object]),
-      _set: dart.definiteFunctionType(dart.void, [K, V]),
-      remove: dart.definiteFunctionType(V, [core.Object])
     })
   });
   dart.defineExtensionMembers(_CustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -23915,8 +24074,7 @@
   dart.setSignature(_HashMapKeyIterable, {
     constructors: () => ({new: dart.definiteFunctionType(collection._HashMapKeyIterable$(E), [_HashMapOfE$dynamic()])}),
     fields: () => ({[_map]: _HashMapOfE$dynamic()}),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-    methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
   });
   dart.defineExtensionMembers(_HashMapKeyIterable, [
     'contains',
@@ -24113,19 +24271,7 @@
       [_map]: dart.dynamic,
       [_modifications]: core.int
     }),
-    getters: () => ({
-      keys: dart.definiteFunctionType(core.Iterable$(K), []),
-      values: dart.definiteFunctionType(core.Iterable$(V), [])
-    }),
-    methods: () => ({
-      addAll: dart.definiteFunctionType(dart.void, [MapOfK$V()]),
-      _get: dart.definiteFunctionType(V, [core.Object]),
-      _set: dart.definiteFunctionType(dart.void, [K, V]),
-      putIfAbsent: dart.definiteFunctionType(V, [K, VoidToV()]),
-      remove: dart.definiteFunctionType(V, [core.Object]),
-      forEach: dart.definiteFunctionType(dart.void, [KAndVTovoid()]),
-      [_modified]: dart.definiteFunctionType(dart.void, [])
-    })
+    methods: () => ({[_modified]: dart.definiteFunctionType(dart.void, [])})
   });
   dart.defineExtensionMembers(_Es6LinkedIdentityHashMap, [
     'containsKey',
@@ -24195,8 +24341,7 @@
       [_map]: dart.dynamic,
       [_isKeys]: core.bool
     }),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-    methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
   });
   dart.defineExtensionMembers(_Es6MapIterable, [
     'contains',
@@ -24315,11 +24460,6 @@
       [_equals]: _EqualityOfK(),
       [_hashCode]: _HasherOfK(),
       [_validKey]: _PredicateOfObject()
-    }),
-    methods: () => ({
-      _get: dart.definiteFunctionType(V, [core.Object]),
-      _set: dart.definiteFunctionType(dart.void, [K, V]),
-      remove: dart.definiteFunctionType(V, [core.Object])
     })
   });
   dart.defineExtensionMembers(_LinkedCustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -24691,11 +24831,7 @@
     }
   }
   dart.setSignature(_HashSetBase, {
-    methods: () => ({
-      difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-      intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-      toSet: dart.definiteFunctionType(core.Set$(E), [])
-    })
+    methods: () => ({toSet: dart.definiteFunctionType(core.Set$(E), [])})
   });
   dart.defineExtensionMembers(_HashSetBase, ['toSet']);
   return _HashSetBase;
@@ -24945,7 +25081,6 @@
       [_lookup]: dart.definiteFunctionType(E, [core.Object]),
       add: dart.definiteFunctionType(core.bool, [E]),
       [_add]: dart.definiteFunctionType(core.bool, [E]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
       remove: dart.definiteFunctionType(core.bool, [core.Object]),
       [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
       [_computeElements]: dart.definiteFunctionType(core.List$(E), []),
@@ -24996,9 +25131,6 @@
       return -1;
     }
   }
-  dart.setSignature(_IdentityHashSet, {
-    methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-  });
   return _IdentityHashSet;
 });
 collection._IdentityHashSet = _IdentityHashSet();
@@ -25052,11 +25184,6 @@
       [_equality]: _EqualityOfE(),
       [_hasher]: _HasherOfE(),
       [_validKey]: _PredicateOfObject()
-    }),
-    methods: () => ({
-      [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-      add: dart.definiteFunctionType(core.bool, [E]),
-      lookup: dart.definiteFunctionType(E, [core.Object])
     })
   });
   dart.defineExtensionMembers(_CustomHashSet, ['contains']);
@@ -25388,9 +25515,7 @@
     }),
     getters: () => ({
       iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-      length: dart.definiteFunctionType(core.int, []),
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, [])
+      length: dart.definiteFunctionType(core.int, [])
     }),
     methods: () => ({
       [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
@@ -25399,13 +25524,10 @@
       [_contains]: dart.definiteFunctionType(core.bool, [core.Object]),
       lookup: dart.definiteFunctionType(E, [core.Object]),
       [_lookup]: dart.definiteFunctionType(E, [core.Object]),
-      forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
       add: dart.definiteFunctionType(core.bool, [E]),
       [_add]: dart.definiteFunctionType(core.bool, [E]),
       remove: dart.definiteFunctionType(core.bool, [core.Object]),
       [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
-      removeWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
-      retainWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
       [_filterWhere]: dart.definiteFunctionType(dart.void, [ETobool(), core.bool]),
       [_addHashTableEntry]: dart.definiteFunctionType(core.bool, [dart.dynamic, E]),
       [_removeHashTableEntry]: dart.definiteFunctionType(core.bool, [dart.dynamic, core.Object]),
@@ -25461,9 +25583,6 @@
       return -1;
     }
   }
-  dart.setSignature(_LinkedIdentityHashSet, {
-    methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-  });
   return _LinkedIdentityHashSet;
 });
 collection._LinkedIdentityHashSet = _LinkedIdentityHashSet();
@@ -25529,11 +25648,6 @@
       [_equality]: _EqualityOfE(),
       [_hasher]: _HasherOfE(),
       [_validKey]: _PredicateOfObject()
-    }),
-    methods: () => ({
-      [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-      add: dart.definiteFunctionType(core.bool, [E]),
-      lookup: dart.definiteFunctionType(E, [core.Object])
     })
   });
   dart.defineExtensionMembers(_LinkedCustomHashSet, ['contains']);
@@ -26479,19 +26593,13 @@
       [_length]: core.int,
       [_first]: E
     }),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, []),
-      single: dart.definiteFunctionType(E, [])
-    }),
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
     methods: () => ({
       addFirst: dart.definiteFunctionType(dart.void, [E]),
       add: dart.definiteFunctionType(dart.void, [E]),
       addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
       remove: dart.definiteFunctionType(core.bool, [E]),
       clear: dart.definiteFunctionType(dart.void, []),
-      forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
       [_insertBefore]: dart.definiteFunctionType(dart.void, [E, E], {updateFirst: core.bool}),
       [_unlink]: dart.definiteFunctionType(dart.void, [E])
     })
@@ -26783,12 +26891,7 @@
   dart.setSignature(_MapBaseValueIterable, {
     constructors: () => ({new: dart.definiteFunctionType(collection._MapBaseValueIterable$(K, V), [MapOfK$V()])}),
     fields: () => ({[_map]: MapOfK$V()}),
-    getters: () => ({
-      first: dart.definiteFunctionType(V, []),
-      single: dart.definiteFunctionType(V, []),
-      last: dart.definiteFunctionType(V, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(V), [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(V), [])})
   });
   dart.defineExtensionMembers(_MapBaseValueIterable, [
     'length',
@@ -27461,12 +27564,7 @@
       [_sentinel]: _DoubleLinkedQueueSentinelOfE(),
       [_elementCount]: core.int
     }),
-    getters: () => ({
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, []),
-      single: dart.definiteFunctionType(E, []),
-      iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])
-    }),
+    getters: () => ({iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])}),
     methods: () => ({
       addLast: dart.definiteFunctionType(dart.void, [E]),
       addFirst: dart.definiteFunctionType(dart.void, [E]),
@@ -27838,16 +27936,8 @@
       [_tail]: core.int,
       [_modificationCount]: core.int
     }),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, []),
-      single: dart.definiteFunctionType(E, [])
-    }),
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
     methods: () => ({
-      forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-      elementAt: dart.definiteFunctionType(E, [core.int]),
-      toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
       add: dart.definiteFunctionType(dart.void, [E]),
       addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
       remove: dart.definiteFunctionType(core.bool, [core.Object]),
@@ -28548,8 +28638,7 @@
   dart.setSignature(_SplayTreeKeyIterable, {
     constructors: () => ({new: dart.definiteFunctionType(collection._SplayTreeKeyIterable$(K), [_SplayTreeOfK$_SplayTreeNodeOfK()])}),
     fields: () => ({[_tree]: _SplayTreeOfK$_SplayTreeNodeOfK()}),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])}),
-    methods: () => ({toSet: dart.definiteFunctionType(core.Set$(K), [])})
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])})
   });
   dart.defineExtensionMembers(_SplayTreeKeyIterable, ['toSet', 'length', 'isEmpty', 'iterator']);
   return _SplayTreeKeyIterable;
@@ -28819,24 +28908,14 @@
       [_comparator]: ComparatorOfE(),
       [_validKey]: collection._Predicate
     }),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, []),
-      single: dart.definiteFunctionType(E, [])
-    }),
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
     methods: () => ({
       [_compare]: dart.definiteFunctionType(core.int, [E, E]),
       add: dart.definiteFunctionType(core.bool, [E]),
       remove: dart.definiteFunctionType(core.bool, [core.Object]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
       lookup: dart.definiteFunctionType(E, [core.Object]),
-      intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-      difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-      union: dart.definiteFunctionType(core.Set$(E), [SetOfE()]),
       [_clone]: dart.definiteFunctionType(collection.SplayTreeSet$(E), []),
-      [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()]),
-      toSet: dart.definiteFunctionType(core.Set$(E), [])
+      [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()])
     })
   });
   dart.defineExtensionMembers(SplayTreeSet, [
@@ -29150,7 +29229,6 @@
 dart.setSignature(convert._JsonMapKeyIterable, {
   constructors: () => ({new: dart.definiteFunctionType(convert._JsonMapKeyIterable, [convert._JsonMap])}),
   fields: () => ({[_parent]: convert._JsonMap}),
-  getters: () => ({iterator: dart.definiteFunctionType(core.Iterator, [])}),
   methods: () => ({elementAt: dart.definiteFunctionType(core.String, [core.int])})
 });
 dart.defineExtensionMembers(convert._JsonMapKeyIterable, ['elementAt', 'contains', 'length', 'iterator']);
@@ -29575,8 +29653,7 @@
   fields: () => ({[_subsetMask]: core.int}),
   methods: () => ({
     convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-    startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-    bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+    startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
   })
 });
 convert.AsciiEncoder = class AsciiEncoder extends convert._UnicodeSubsetEncoder {
@@ -29666,8 +29743,7 @@
   }),
   methods: () => ({
     convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-    [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int]),
-    bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()])
+    [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int])
   })
 });
 convert.AsciiDecoder = class AsciiDecoder extends convert._UnicodeSubsetDecoder {
@@ -29690,8 +29766,7 @@
   }
 };
 dart.setSignature(convert.AsciiDecoder, {
-  constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})}),
-  methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+  constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})})
 });
 const _utf8Sink = Symbol('_utf8Sink');
 let const;
@@ -30706,8 +30781,7 @@
     fields: () => ({[_codec]: CodecOfS$T()}),
     getters: () => ({
       encoder: dart.definiteFunctionType(convert.Converter$(T, S), []),
-      decoder: dart.definiteFunctionType(convert.Converter$(S, T), []),
-      inverted: dart.definiteFunctionType(convert.Codec$(S, T), [])
+      decoder: dart.definiteFunctionType(convert.Converter$(S, T), [])
     })
   });
   return _InvertedCodec;
@@ -30738,10 +30812,7 @@
       [_first]: ConverterOfS$M(),
       [_second]: ConverterOfM$T()
     }),
-    methods: () => ({
-      convert: dart.definiteFunctionType(T, [S]),
-      startChunkedConversion: dart.definiteFunctionType(core.Sink$(S), [SinkOfT()])
-    })
+    methods: () => ({convert: dart.definiteFunctionType(T, [S])})
   });
   return _FusedConverter;
 });
@@ -31060,9 +31131,7 @@
   }),
   methods: () => ({
     convert: dart.definiteFunctionType(core.String, [core.Object]),
-    startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()]),
-    bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfObject()]),
-    fuse: dart.definiteFunctionType(T => [convert.Converter$(core.Object, T), [convert.Converter$(core.String, T)]])
+    startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()])
   })
 });
 const _indent = Symbol('_indent');
@@ -31136,8 +31205,7 @@
   }),
   methods: () => ({
     convert: dart.definiteFunctionType(core.List$(core.int), [core.Object]),
-    startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()]),
-    bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfObject()])
+    startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()])
   }),
   sfields: () => ({DEFAULT_BUFFER_SIZE: core.int}),
   statics: () => ({_utf8Encode: dart.definiteFunctionType(core.List$(core.int), [core.String])}),
@@ -31244,8 +31312,7 @@
   fields: () => ({[_reviver]: convert._Reviver}),
   methods: () => ({
     convert: dart.definiteFunctionType(dart.dynamic, [core.String]),
-    startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()]),
-    bind: dart.definiteFunctionType(async.Stream$(core.Object), [StreamOfString()])
+    startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()])
   })
 });
 convert._parseJson = function(source, reviver) {
@@ -31842,8 +31909,7 @@
   }
 };
 dart.setSignature(convert.Latin1Decoder, {
-  constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})}),
-  methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+  constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})})
 });
 const _addSliceToSink = Symbol('_addSliceToSink');
 convert._Latin1DecoderSink = class _Latin1DecoderSink extends convert.ByteConversionSinkBase {
@@ -32431,8 +32497,7 @@
   constructors: () => ({new: dart.definiteFunctionType(convert.Utf8Encoder, [])}),
   methods: () => ({
     convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-    startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-    bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+    startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
   })
 });
 convert._Utf8Encoder = class _Utf8Encoder extends core.Object {
@@ -32677,9 +32742,7 @@
   fields: () => ({[_allowMalformed]: core.bool}),
   methods: () => ({
     convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-    startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()]),
-    bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()]),
-    fuse: dart.definiteFunctionType(T => [convert.Converter$(core.List$(core.int), T), [convert.Converter$(core.String, T)]])
+    startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])
   }),
   statics: () => ({_convertIntercepted: dart.definiteFunctionType(core.String, [core.bool, ListOfint(), core.int, core.int])}),
   names: ['_convertIntercepted']
@@ -34196,10 +34259,6 @@
       [_generator]: _GeneratorOfE()
     }),
     getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-    methods: () => ({
-      skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-      take: dart.definiteFunctionType(core.Iterable$(E), [core.int])
-    }),
     statics: () => ({_id: dart.definiteFunctionType(core.int, [core.int])}),
     names: ['_id']
   });
@@ -34526,10 +34585,7 @@
 dart.setSignature(core.Runes, {
   constructors: () => ({new: dart.definiteFunctionType(core.Runes, [core.String])}),
   fields: () => ({string: core.String}),
-  getters: () => ({
-    iterator: dart.definiteFunctionType(core.RuneIterator, []),
-    last: dart.definiteFunctionType(core.int, [])
-  })
+  getters: () => ({iterator: dart.definiteFunctionType(core.RuneIterator, [])})
 });
 dart.defineExtensionMembers(core.Runes, ['iterator', 'last']);
 core._isLeadSurrogate = function(code) {
@@ -38560,8 +38616,8 @@
       if (dart.test(io._isErrorResponse(response))) {
         dart.throw(io._exceptionFromResponse(response, "Cannot resolve symbolic links", this.path));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfString()._check(response);
+    }, dynamicToFutureOrOfString()));
   }
   resolveSymbolicLinksSync() {
     let result = io.FileSystemEntity._resolveSymbolicLinks(this.path);
@@ -38586,8 +38642,8 @@
       if (dart.test(io._isErrorResponse(response))) {
         dart.throw(io._exceptionFromResponse(response, dart.str`Error in FileSystemEntity.identical(${path1}, ${path2})`, ""));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfbool()._check(response);
+    }, dynamicToFutureOrOfbool()));
   }
   get isAbsolute() {
     if (dart.test(io.Platform.isWindows)) {
@@ -38682,8 +38738,8 @@
       if (dart.test(io._isErrorResponse(response))) {
         dart.throw(io._exceptionFromResponse(response, "Error getting type", path));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfint()._check(response);
+    }, dynamicToFutureOrOfint()));
   }
   static _throwIfError(result, msg, path) {
     if (path === void 0) path = null;
@@ -38878,7 +38934,7 @@
         } else {
           return this.create();
         }
-      }, boolTodynamic()));
+      }, boolToFutureOrOfDirectory()));
     } else {
       return io._IOService._dispatch(io._DIRECTORY_CREATE, JSArrayOfString().of([this.path])).then(io._Directory)(dart.fn(response => {
         if (dart.test(this[_isErrorResponse](response))) {
@@ -39099,7 +39155,7 @@
         this.error(response);
         this.close();
       }
-    }, dynamicTodynamic()));
+    }, dynamicToFutureOr()));
   }
   onResume() {
     if (!dart.test(this.nextRunning)) {
@@ -39164,7 +39220,7 @@
       } else {
         this.controller.addError(new io.FileSystemException("Internal error"));
       }
-    }, dynamicTodynamic()));
+    }, dynamicToFutureOr()));
   }
   [_cleanup]() {
     this.controller.close();
@@ -39306,6 +39362,9 @@
     }[this.index];
   }
 };
+dart.setSignature(io.FileLock, {
+  fields: () => ({index: core.int})
+});
 dart.defineEnumValues(io.FileLock, [
   'SHARED',
   'EXCLUSIVE'
@@ -39471,7 +39530,7 @@
       if (dart.test(this[_atEnd])) {
         this[_closeFile]();
       }
-    }, ListOfintTodynamic())).catchError(dart.fn((e, s) => {
+    }, ListOfintToFutureOr())).catchError(dart.fn((e, s) => {
       if (!dart.test(this[_unsubscribed])) {
         this[_controller].addError(e, core.StackTrace._check(s));
         this[_closeFile]();
@@ -39494,7 +39553,7 @@
     dart.fn(onReady, RandomAccessFileTovoid());
     const onOpenFile = (function(file) {
       if (dart.notNull(this[_position]) > 0) {
-        file.setPosition(this[_position]).then(dart.dynamic)(onReady, {onError: dart.fn((e, s) => {
+        file.setPosition(this[_position]).then(dart.void)(onReady, {onError: dart.fn((e, s) => {
             this[_controller].addError(e, core.StackTrace._check(s));
             this[_readInProgress] = false;
             this[_closeFile]();
@@ -39511,7 +39570,7 @@
     }).bind(this);
     dart.fn(openFailed, dynamicAnddynamicTovoid());
     if (this[_path] != null) {
-      io.File.new(this[_path]).open({mode: io.FileMode.READ}).then(dart.dynamic)(onOpenFile, {onError: openFailed});
+      io.File.new(this[_path]).open({mode: io.FileMode.READ}).then(dart.void)(onOpenFile, {onError: openFailed});
     } else {
       try {
         onOpenFile(io._File._openStdioSync(0));
@@ -39578,7 +39637,7 @@
       _subscription = stream.listen(dart.fn(d => {
         dart.dsend(_subscription, 'pause');
         try {
-          openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileTodynamic()), {onError: error});
+          openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileToFutureOr()), {onError: error});
         } catch (e) {
           let stackTrace = dart.stackTrace(e);
           error(e, stackTrace);
@@ -39587,7 +39646,7 @@
       }, ListOfintTovoid()), {onDone: dart.fn(() => {
           completer.complete(this[_file]);
         }, VoidTovoid()), onError: error, cancelOnError: true});
-    }, RandomAccessFileTodynamic())).catchError(dart.bind(completer, 'completeError'));
+    }, RandomAccessFileToFutureOr())).catchError(dart.bind(completer, 'completeError'));
     return completer.future;
   }
   close() {
@@ -39625,8 +39684,8 @@
       if (dart.test(io._isErrorResponse(response))) {
         dart.throw(io._exceptionFromResponse(response, "Cannot check existence", this.path));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfbool()._check(response);
+    }, dynamicToFutureOrOfbool()));
   }
   static _exists(path) {
     dart.throw(new core.UnsupportedError("File._exists"));
@@ -39750,8 +39809,8 @@
       if (dart.test(io._isErrorResponse(response))) {
         dart.throw(io._exceptionFromResponse(response, "Cannot retrieve length of file", this.path));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfint()._check(response);
+    }, dynamicToFutureOrOfint()));
   }
   static _lengthFromPath(path) {
     dart.throw(new core.UnsupportedError("File._lengthFromPath"));
@@ -39889,7 +39948,7 @@
     return this.open({mode: mode}).then(io.File)(dart.fn(file => file.writeFrom(bytes, 0, bytes[dartx.length]).then(dart.dynamic)(dart.fn(_ => {
       if (dart.test(flush)) return file.flush().then(io._File)(dart.fn(_ => this, RandomAccessFileTo_File()));
       return this;
-    }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileTodynamic()));
+    }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileToFutureOrOfFile()));
   }
   writeAsBytesSync(bytes, opts) {
     let mode = opts && 'mode' in opts ? opts.mode : io.FileMode.WRITE;
@@ -40050,8 +40109,8 @@
         dart.throw(io._exceptionFromResponse(response, "readByte failed", this.path));
       }
       this[_resourceInfo].addRead(1);
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfint()._check(response);
+    }, dynamicToFutureOrOfint()));
   }
   readByteSync() {
     this[_checkAvailable]();
@@ -40071,8 +40130,8 @@
         dart.throw(io._exceptionFromResponse(response, "read failed", this.path));
       }
       this[_resourceInfo].addRead(core.int._check(dart.dload(dart.dindex(response, 1), 'length')));
-      return dart.dindex(response, 1);
-    }, dynamicTodynamic()));
+      return FutureOrOfListOfint()._check(dart.dindex(response, 1));
+    }, dynamicToFutureOrOfListOfint()));
   }
   readSync(bytes) {
     this[_checkAvailable]();
@@ -40105,8 +40164,8 @@
       let data = dart.dindex(response, 2);
       buffer[dartx.setRange](start, dart.asInt(dart.notNull(start) + dart.notNull(core.num._check(read))), IterableOfint()._check(data));
       this[_resourceInfo].addRead(core.int._check(read));
-      return read;
-    }, dynamicTodynamic()));
+      return FutureOrOfint()._check(read);
+    }, dynamicToFutureOrOfint()));
   }
   readIntoSync(buffer, start, end) {
     if (start === void 0) start = 0;
@@ -40219,8 +40278,8 @@
       if (dart.test(io._isErrorResponse(response))) {
         dart.throw(io._exceptionFromResponse(response, "position failed", this.path));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfint()._check(response);
+    }, dynamicToFutureOrOfint()));
   }
   positionSync() {
     this[_checkAvailable]();
@@ -40265,8 +40324,8 @@
       if (dart.test(io._isErrorResponse(response))) {
         dart.throw(io._exceptionFromResponse(response, "length failed", this.path));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfint()._check(response);
+    }, dynamicToFutureOrOfint()));
   }
   lengthSync() {
     this[_checkAvailable]();
@@ -43007,7 +43066,7 @@
       } else {
         return this;
       }
-    }, dynamicTodynamic()));
+    }, dynamicToFutureOrOfHttpClientResponse()));
   }
 };
 io._HttpClientResponse[dart.implements] = () => [io.HttpClientResponse];
@@ -43120,7 +43179,7 @@
       return this.done;
     }
     [_closeTarget]() {
-      this[_target].close().then(dart.dynamic)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
+      this[_target].close().then(dart.void)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
     }
     get done() {
       return this[_doneCompleter].future;
@@ -43154,7 +43213,7 @@
           } else {
             this[_closeTarget]();
           }
-        }, dynamicTodynamic()), {onError: dart.fn((error, stackTrace) => {
+        }, dynamicToFutureOr()), {onError: dart.fn((error, stackTrace) => {
             if (dart.test(this[_isBound])) {
               this[_controllerCompleter].completeError(error, core.StackTrace._check(stackTrace));
               this[_controllerCompleter] = null;
@@ -43342,8 +43401,7 @@
       contentLength: dart.definiteFunctionType(dart.void, [core.int]),
       persistentConnection: dart.definiteFunctionType(dart.void, [core.bool]),
       bufferOutput: dart.definiteFunctionType(dart.void, [core.bool])
-    }),
-    methods: () => ({add: dart.definiteFunctionType(dart.void, [ListOfint()])})
+    })
   });
   return _HttpOutboundMessage;
 });
@@ -43737,7 +43795,7 @@
   }
   get done() {
     if (this[_response] == null) {
-      this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => list[dartx._get](0), ListTodynamic()));
+      this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => FutureOrOfHttpClientResponse()._check(list[dartx._get](0)), ListToFutureOrOfHttpClientResponse()));
     }
     return this[_response];
   }
@@ -43778,7 +43836,7 @@
     } else {
       future = FutureOfHttpClientResponse().value(response);
     }
-    future.then(dart.dynamic)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
+    future.then(dart.void)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
   }
   [_onError](error, stackTrace) {
     this[_responseCompleter].completeError(error, stackTrace);
@@ -44304,7 +44362,7 @@
       if (incoming.statusCode == 100) {
         incoming.drain(dart.dynamic)().then(dart.dynamic)(dart.fn(_ => {
           this[_subscription].resume();
-        }, dynamicTodynamic())).catchError(dart.fn((error, stackTrace) => {
+        }, dynamicToFutureOr())).catchError(dart.fn((error, stackTrace) => {
           if (stackTrace === void 0) stackTrace = null;
           this[_nextResponseCompleter].completeError(new io.HttpException(core.String._check(dart.dload(error, 'message')), {uri: this[_currentUri]}), stackTrace);
           this[_nextResponseCompleter] = null;
@@ -44381,7 +44439,7 @@
           } else {
             this.destroy();
           }
-        }, dynamicTodynamic()));
+        }, dynamicToFutureOr()));
         if (proxyCreds != null && dart.equals(proxyCreds.scheme, io._AuthenticationScheme.DIGEST)) {
           let authInfo = incoming.headers._get("proxy-authentication-info");
           if (authInfo != null && authInfo[dartx.length] == 1) {
@@ -44399,7 +44457,7 @@
           }
         }
         request[_onIncoming](incoming);
-      }, _HttpIncomingTodynamic())).catchError(dart.fn(error => {
+      }, _HttpIncomingToFutureOr())).catchError(dart.fn(error => {
         dart.throw(new io.HttpException("Connection closed before data was received", {uri: uri}));
       }, dynamicTodynamic()), {test: dart.fn(error => core.StateError.is(error), ObjectTobool())}).catchError(dart.fn((error, stackTrace) => {
         this.destroy();
@@ -44423,7 +44481,7 @@
   close() {
     this.closed = true;
     this[_httpClient][_connectionClosed](this);
-    this[_streamFuture].then(dart.dynamic)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid()));
+    this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid()));
   }
   createProxyTunnel(host, port, proxy, callback) {
     let request = this.send(core.Uri.new({host: core.String._check(host), port: core.int._check(port)}), core.int._check(port), "CONNECT", io._Proxy._check(proxy));
@@ -44582,7 +44640,7 @@
     if (client.maxConnectionsPerHost != null && dart.notNull(this[_active].length) + dart.notNull(this[_connecting]) >= dart.notNull(client.maxConnectionsPerHost)) {
       let completer = async.Completer.new();
       this[_pending].add(dart.fn(() => {
-        this.connect(uriHost, uriPort, proxy, client).then(dart.dynamic)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
+        this.connect(uriHost, uriPort, proxy, client).then(dart.void)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
       }, VoidTodynamic()));
       return FutureOf_ConnectionInfo()._check(completer.future);
     }
@@ -44608,7 +44666,7 @@
         this.addNewActive(connection);
         return new io._ConnectionInfo(connection, proxy);
       }
-    }, dynamicTodynamic()), {onError: dart.fn(error => {
+    }, dynamicToFutureOrOf_ConnectionInfo()), {onError: dart.fn(error => {
         this[_connecting] = dart.notNull(this[_connecting]) - 1;
         this[_checkPending]();
         dart.throw(error);
@@ -44807,7 +44865,7 @@
         return this[_getConnection](uri.host, port, proxyConf, isSecure).then(io._HttpClientRequest)(send);
       }
       return send(info);
-    }, _ConnectionInfoTodynamic()));
+    }, _ConnectionInfoToFutureOrOf_HttpClientRequest()));
   }
   [_openUrlFromRequest](method, uri, previous) {
     let resolved = previous.uri.resolveUri(uri);
@@ -45091,7 +45149,7 @@
       this[_httpServer][_markActive](this);
       incoming.dataDone.then(dart.dynamic)(dart.fn(closing => {
         if (dart.test(closing)) this.destroy();
-      }, dynamicTodynamic()));
+      }, dynamicToFutureOr()));
       this[_subscription].pause();
       this[_state] = io._HttpConnection._ACTIVE;
       let outgoing = new io._HttpOutgoing(io.Socket._check(this[_socket]));
@@ -45108,7 +45166,7 @@
         } else {
           this.destroy();
         }
-      }, dynamicTodynamic()), {onError: dart.fn(_ => {
+      }, dynamicToFutureOr()), {onError: dart.fn(_ => {
           this.destroy();
         }, dynamicTodynamic())});
       outgoing.ignoreBody = request.method == "HEAD";
@@ -47911,8 +47969,8 @@
       if (dart.test(this[_isErrorResponse](response))) {
         dart.throw(this[_exceptionFromResponse](response, "Cannot get target of link", this.path));
       }
-      return response;
-    }, dynamicTodynamic()));
+      return FutureOrOfString()._check(response);
+    }, dynamicToFutureOrOfString()));
   }
   targetSync() {
     let result = io._File._linkTarget(this.path);
@@ -48380,6 +48438,9 @@
     }[this.index];
   }
 };
+dart.setSignature(io.ProcessStartMode, {
+  fields: () => ({index: core.int})
+});
 dart.defineEnumValues(io.ProcessStartMode, [
   'NORMAL',
   'DETACHED',
@@ -48822,7 +48883,7 @@
       } else {
         this[_controller].add(secureConnection);
       }
-    }, RawSecureSocketTodynamic())).catchError(dart.fn((e, s) => {
+    }, RawSecureSocketToFutureOr())).catchError(dart.fn((e, s) => {
       if (!dart.test(this[_closed])) {
         this[_controller].addError(e, core.StackTrace._check(s));
       }
@@ -49121,7 +49182,7 @@
     this[_closedWrite] = true;
     this[_closedRead] = true;
     if (this[_socket] != null) {
-      this[_socket].close().then(dart.dynamic)(dart.bind(this, _completeCloseCompleter));
+      this[_socket].close().then(dart.void)(dart.bind(this, _completeCloseCompleter));
     } else {
       this[_completeCloseCompleter]();
     }
@@ -49406,7 +49467,7 @@
           }
         }
         this[_tryFilter]();
-      }, _FilterStatusTodynamic())).catchError(dart.bind(this, _reportError));
+      }, _FilterStatusToFutureOr())).catchError(dart.bind(this, _reportError));
     }
   }
   [_readSocketOrBufferedData](bytes) {
@@ -50681,10 +50742,6 @@
     name: dart.definiteFunctionType(core.String, []),
     encoder: dart.definiteFunctionType(convert.Converter$(core.String, core.List$(core.int)), []),
     decoder: dart.definiteFunctionType(convert.Converter$(core.List$(core.int), core.String), [])
-  }),
-  methods: () => ({
-    encode: dart.definiteFunctionType(core.List$(core.int), [core.String]),
-    decode: dart.definiteFunctionType(core.String, [ListOfint()])
   })
 });
 io.SYSTEM_ENCODING = dart.const(new io.SystemEncoding());
@@ -51486,7 +51543,7 @@
   }
   bind(stream) {
     stream.listen(dart.fn(request => {
-      io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.dynamic)(dart.fn(webSocket => this[_controller].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller], 'addError'));
+      io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.void)(dart.fn(webSocket => this[_controller].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller], 'addError'));
     }, HttpRequestTovoid()), {onDone: dart.fn(() => {
         this[_controller].close();
       }, VoidTovoid())});
@@ -51899,7 +51956,7 @@
     this.socket.addStream(stream).then(dart.dynamic)(dart.fn(_ => {
       this[_done]();
       this[_closeCompleter].complete(this.webSocket);
-    }, dynamicTodynamic()), {onError: dart.fn((error, stackTrace) => {
+    }, dynamicToFutureOr()), {onError: dart.fn((error, stackTrace) => {
         this[_closed] = true;
         this[_cancel]();
         if (core.ArgumentError.is(error)) {
@@ -52035,7 +52092,7 @@
       function error(message) {
         response.detachSocket().then(dart.dynamic)(dart.fn(socket => {
           socket.destroy();
-        }, SocketTodynamic()));
+        }, SocketToFutureOr()));
         dart.throw(new io.WebSocketException(message));
       }
       dart.fn(error, StringTovoid());
@@ -52880,14 +52937,7 @@
       [_checkIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
       [_checkInsertIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
       _get: dart.definiteFunctionType(E, [core.Object]),
-      _set: dart.definiteFunctionType(dart.void, [core.Object, E]),
-      add: dart.definiteFunctionType(dart.void, [E]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-      removeAt: dart.definiteFunctionType(E, [core.int]),
-      removeLast: dart.definiteFunctionType(E, []),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-      sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()])
+      _set: dart.definiteFunctionType(dart.void, [core.Object, E])
     }),
     statics: () => ({_checkRange: dart.definiteFunctionType(dart.dynamic, [core.int, core.int, core.int])}),
     names: ['_checkRange']
@@ -55443,15 +55493,15 @@
     let completer = CompleterOfDatabase().new();
     this[dartx.onComplete].first.then(dart.dynamic)(dart.fn(_ => {
       completer.complete(this[dartx.db]);
-    }, EventTodynamic()));
+    }, EventToFutureOr()));
     this[dartx.onError].first.then(dart.dynamic)(dart.fn(e => {
       completer.completeError(e);
-    }, EventTodynamic()));
+    }, EventToFutureOr()));
     this[dartx.onAbort].first.then(dart.dynamic)(dart.fn(e => {
       if (!dart.test(completer.isCompleted)) {
         completer.completeError(e);
       }
-    }, EventTodynamic()));
+    }, EventToFutureOr()));
     return completer.future;
   }
   static _() {
@@ -72210,17 +72260,11 @@
 html.DomStringList[dart.implements] = () => [ListOfString()];
 dart.setSignature(html.DomStringList, {
   constructors: () => ({_: dart.definiteFunctionType(html.DomStringList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(core.String, []),
-    [dartx.last]: dart.definiteFunctionType(core.String, []),
-    [dartx.single]: dart.definiteFunctionType(core.String, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-    [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
     [__getter__]: dart.definiteFunctionType(core.String, [core.int]),
     [dartx.item]: dart.definiteFunctionType(core.String, [core.int])
   })
@@ -72389,10 +72433,6 @@
   }),
   getters: () => ({
     length: dart.definiteFunctionType(core.int, []),
-    iterator: dart.definiteFunctionType(core.Iterator$(html.Element), []),
-    first: dart.definiteFunctionType(html.Element, []),
-    last: dart.definiteFunctionType(html.Element, []),
-    single: dart.definiteFunctionType(html.Element, []),
     rawList: dart.definiteFunctionType(core.List$(html.Node), [])
   }),
   setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
@@ -72400,18 +72440,7 @@
     _get: dart.definiteFunctionType(html.Element, [core.int]),
     _set: dart.definiteFunctionType(dart.void, [core.int, html.Element]),
     add: dart.definiteFunctionType(html.Element, [html.Element]),
-    addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-    sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-    removeWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-    retainWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-    [_filter]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool]),
-    setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-    replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-    fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html.Element]),
-    insert: dart.definiteFunctionType(dart.void, [core.int, html.Element]),
-    setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-    removeAt: dart.definiteFunctionType(html.Element, [core.int]),
-    removeLast: dart.definiteFunctionType(html.Element, [])
+    [_filter]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool])
   })
 });
 dart.defineExtensionMembers(html._ChildrenElementList, [
@@ -72726,9 +72755,6 @@
     fields: () => ({[_nodeList]: ListOfNode()}),
     getters: () => ({
       length: dart.definiteFunctionType(core.int, []),
-      first: dart.definiteFunctionType(E, []),
-      last: dart.definiteFunctionType(E, []),
-      single: dart.definiteFunctionType(E, []),
       classes: dart.definiteFunctionType(html.CssClassSet, []),
       style: dart.definiteFunctionType(html.CssStyleDeclarationBase, []),
       contentEdge: dart.definiteFunctionType(html.CssRect, []),
@@ -72812,8 +72838,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(E, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-      sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfE()])
+      _set: dart.definiteFunctionType(dart.void, [core.int, E])
     })
   });
   dart.defineExtensionMembers(_FrozenElementList, [
@@ -73581,17 +73606,11 @@
 html.FileList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfFile()];
 dart.setSignature(html.FileList, {
   constructors: () => ({_: dart.definiteFunctionType(html.FileList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.File, []),
-    [dartx.last]: dart.definiteFunctionType(html.File, []),
-    [dartx.single]: dart.definiteFunctionType(html.File, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.File, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.File]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.File, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.File, [core.int])
   })
 });
@@ -75659,17 +75678,11 @@
 html.HtmlCollection[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
 dart.setSignature(html.HtmlCollection, {
   constructors: () => ({_: dart.definiteFunctionType(html.HtmlCollection, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.Node, []),
-    [dartx.last]: dart.definiteFunctionType(html.Node, []),
-    [dartx.single]: dart.definiteFunctionType(html.Node, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.Node, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.Node]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.Node, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.Node, [core.int]),
     [dartx.namedItem]: dart.definiteFunctionType(core.Object, [core.String])
   })
@@ -80853,17 +80866,11 @@
 html.MimeTypeArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfMimeType()];
 dart.setSignature(html.MimeTypeArray, {
   constructors: () => ({_: dart.definiteFunctionType(html.MimeTypeArray, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.MimeType, []),
-    [dartx.last]: dart.definiteFunctionType(html.MimeType, []),
-    [dartx.single]: dart.definiteFunctionType(html.MimeType, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.MimeType, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.MimeType]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.MimeType, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.MimeType, [core.int]),
     [dartx.namedItem]: dart.definiteFunctionType(html.MimeType, [core.String])
   })
@@ -81203,7 +81210,7 @@
   }
   static new(callback) {
     0;
-    return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(html._wrapZoneBinaryCallback)(html._wrapBinaryZone(dart.dynamic, dart.dynamic, dart.dynamic)(callback), 2));
+    return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void())(html._wrapBinaryZone(ListOfMutationRecord(), html.MutationObserver, dart.void)(callback), 2));
   }
 };
 dart.setSignature(html.MutationObserver, {
@@ -81896,29 +81903,13 @@
   constructors: () => ({new: dart.definiteFunctionType(html._ChildNodeListLazy, [html.Node])}),
   fields: () => ({[_this]: html.Node}),
   getters: () => ({
-    first: dart.definiteFunctionType(html.Node, []),
-    last: dart.definiteFunctionType(html.Node, []),
-    single: dart.definiteFunctionType(html.Node, []),
-    iterator: dart.definiteFunctionType(core.Iterator$(html.Node), []),
     length: dart.definiteFunctionType(core.int, []),
     rawList: dart.definiteFunctionType(core.List$(html.Node), [])
   }),
   setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
-    add: dart.definiteFunctionType(dart.void, [html.Node]),
-    addAll: dart.definiteFunctionType(dart.void, [IterableOfNode()]),
-    insert: dart.definiteFunctionType(dart.void, [core.int, html.Node]),
-    insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-    setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-    removeLast: dart.definiteFunctionType(html.Node, []),
-    removeAt: dart.definiteFunctionType(html.Node, [core.int]),
     [_filter]: dart.definiteFunctionType(dart.void, [NodeTobool(), core.bool]),
-    removeWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
-    retainWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
     _set: dart.definiteFunctionType(dart.void, [core.int, html.Node]),
-    sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfNode()]),
-    setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfNode()], [core.int]),
-    fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html.Node]),
     _get: dart.definiteFunctionType(html.Node, [core.int])
   })
 });
@@ -82095,17 +82086,11 @@
 html.NodeList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
 dart.setSignature(html.NodeList, {
   constructors: () => ({_: dart.definiteFunctionType(html.NodeList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.Node, []),
-    [dartx.last]: dart.definiteFunctionType(html.Node, []),
-    [dartx.single]: dart.definiteFunctionType(html.Node, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.Node, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.Node]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.Node, [core.int]),
     [_item]: dart.definiteFunctionType(html.Node, [core.int])
   })
 });
@@ -83786,17 +83771,11 @@
 html.PluginArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfPlugin()];
 dart.setSignature(html.PluginArray, {
   constructors: () => ({_: dart.definiteFunctionType(html.PluginArray, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.Plugin, []),
-    [dartx.last]: dart.definiteFunctionType(html.Plugin, []),
-    [dartx.single]: dart.definiteFunctionType(html.Plugin, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.Plugin, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.Plugin]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.Plugin, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.Plugin, [core.int]),
     [dartx.namedItem]: dart.definiteFunctionType(html.Plugin, [core.String]),
     [dartx.refresh]: dart.definiteFunctionType(dart.void, [core.bool])
@@ -87268,17 +87247,11 @@
 html.SourceBufferList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSourceBuffer()];
 dart.setSignature(html.SourceBufferList, {
   constructors: () => ({_: dart.definiteFunctionType(html.SourceBufferList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.SourceBuffer, []),
-    [dartx.last]: dart.definiteFunctionType(html.SourceBuffer, []),
-    [dartx.single]: dart.definiteFunctionType(html.SourceBuffer, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.SourceBuffer, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.SourceBuffer]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.SourceBuffer, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.SourceBuffer, [core.int])
   })
 });
@@ -87522,17 +87495,11 @@
     _: dart.definiteFunctionType(html.SpeechGrammarList, []),
     new: dart.definiteFunctionType(html.SpeechGrammarList, [])
   }),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.SpeechGrammar, []),
-    [dartx.last]: dart.definiteFunctionType(html.SpeechGrammar, []),
-    [dartx.single]: dart.definiteFunctionType(html.SpeechGrammar, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.SpeechGrammar, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.SpeechGrammar]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.SpeechGrammar, [core.int]),
     [dartx.addFromString]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
     [dartx.addFromUri]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
     [dartx.item]: dart.definiteFunctionType(html.SpeechGrammar, [core.int])
@@ -89730,17 +89697,11 @@
 html.TextTrackCueList[dart.implements] = () => [ListOfTextTrackCue(), _js_helper.JavaScriptIndexingBehavior];
 dart.setSignature(html.TextTrackCueList, {
   constructors: () => ({_: dart.definiteFunctionType(html.TextTrackCueList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.TextTrackCue, []),
-    [dartx.last]: dart.definiteFunctionType(html.TextTrackCue, []),
-    [dartx.single]: dart.definiteFunctionType(html.TextTrackCue, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.TextTrackCue, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.TextTrackCue]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.TextTrackCue, [core.int]),
     [dartx.getCueById]: dart.definiteFunctionType(html.TextTrackCue, [core.String]),
     [dartx.item]: dart.definiteFunctionType(html.TextTrackCue, [core.int])
   })
@@ -89820,9 +89781,6 @@
   constructors: () => ({_: dart.definiteFunctionType(html.TextTrackList, [])}),
   getters: () => ({
     [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.TextTrack, []),
-    [dartx.last]: dart.definiteFunctionType(html.TextTrack, []),
-    [dartx.single]: dart.definiteFunctionType(html.TextTrack, []),
     [dartx.onAddTrack]: dart.definiteFunctionType(async.Stream$(html.TrackEvent), []),
     [dartx.onChange]: dart.definiteFunctionType(async.Stream$(html.Event), [])
   }),
@@ -89830,7 +89788,6 @@
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.TextTrack, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.TextTrack]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.TextTrack, [core.int]),
     [dartx.getTrackById]: dart.definiteFunctionType(html.TextTrack, [core.String]),
     [dartx.item]: dart.definiteFunctionType(html.TextTrack, [core.int])
   }),
@@ -90181,17 +90138,11 @@
     new: dart.definiteFunctionType(html.TouchList, []),
     _: dart.definiteFunctionType(html.TouchList, [])
   }),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.Touch, []),
-    [dartx.last]: dart.definiteFunctionType(html.Touch, []),
-    [dartx.single]: dart.definiteFunctionType(html.Touch, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.Touch, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.Touch]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.Touch, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.Touch, [core.int])
   }),
   sgetters: () => ({supported: dart.definiteFunctionType(core.bool, [])})
@@ -94065,17 +94016,11 @@
 html._ClientRectList[dart.implements] = () => [ListOfRectangleOfnum()];
 dart.setSignature(html._ClientRectList, {
   constructors: () => ({_: dart.definiteFunctionType(html._ClientRectList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-    [dartx.last]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-    [dartx.single]: dart.definiteFunctionType(math.Rectangle$(core.num), [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, RectangleOfnum()]),
-    [dartx.elementAt]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
     [__getter__]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
     [dartx.item]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int])
   })
@@ -94142,17 +94087,11 @@
 html._CssRuleList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfCssRule()];
 dart.setSignature(html._CssRuleList, {
   constructors: () => ({_: dart.definiteFunctionType(html._CssRuleList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.CssRule, []),
-    [dartx.last]: dart.definiteFunctionType(html.CssRule, []),
-    [dartx.single]: dart.definiteFunctionType(html.CssRule, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.CssRule, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.CssRule]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.CssRule, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.CssRule, [core.int])
   })
 });
@@ -94395,17 +94334,11 @@
 html._GamepadList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfGamepad()];
 dart.setSignature(html._GamepadList, {
   constructors: () => ({_: dart.definiteFunctionType(html._GamepadList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.Gamepad, []),
-    [dartx.last]: dart.definiteFunctionType(html.Gamepad, []),
-    [dartx.single]: dart.definiteFunctionType(html.Gamepad, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.Gamepad, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.Gamepad]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.Gamepad, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.Gamepad, [core.int])
   })
 });
@@ -94604,17 +94537,11 @@
 html._NamedNodeMap[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
 dart.setSignature(html._NamedNodeMap, {
   constructors: () => ({_: dart.definiteFunctionType(html._NamedNodeMap, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.Node, []),
-    [dartx.last]: dart.definiteFunctionType(html.Node, []),
-    [dartx.single]: dart.definiteFunctionType(html.Node, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.Node, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.Node]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.Node, [core.int]),
     [dartx.getNamedItem]: dart.definiteFunctionType(html._Attr, [core.String]),
     [dartx.getNamedItemNS]: dart.definiteFunctionType(html._Attr, [core.String, core.String]),
     [dartx.item]: dart.definiteFunctionType(html._Attr, [core.int]),
@@ -94814,17 +94741,11 @@
 html._SpeechRecognitionResultList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSpeechRecognitionResult()];
 dart.setSignature(html._SpeechRecognitionResultList, {
   constructors: () => ({_: dart.definiteFunctionType(html._SpeechRecognitionResultList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.SpeechRecognitionResult, []),
-    [dartx.last]: dart.definiteFunctionType(html.SpeechRecognitionResult, []),
-    [dartx.single]: dart.definiteFunctionType(html.SpeechRecognitionResult, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.SpeechRecognitionResult, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.SpeechRecognitionResult]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.SpeechRecognitionResult, [core.int]),
     [dartx.item]: dart.definiteFunctionType(html.SpeechRecognitionResult, [core.int])
   })
 });
@@ -94892,17 +94813,11 @@
 html._StyleSheetList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfStyleSheet()];
 dart.setSignature(html._StyleSheetList, {
   constructors: () => ({_: dart.definiteFunctionType(html._StyleSheetList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(html.StyleSheet, []),
-    [dartx.last]: dart.definiteFunctionType(html.StyleSheet, []),
-    [dartx.single]: dart.definiteFunctionType(html.StyleSheet, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(html.StyleSheet, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html.StyleSheet]),
-    [dartx.elementAt]: dart.definiteFunctionType(html.StyleSheet, [core.int]),
     [__getter__]: dart.definiteFunctionType(html.CssStyleSheet, [core.String]),
     [dartx.item]: dart.definiteFunctionType(html.StyleSheet, [core.int])
   })
@@ -96284,10 +96199,7 @@
       [_eventType]: core.String,
       [_useCapture]: core.bool
     }),
-    methods: () => ({
-      asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-      listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-    })
+    methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
   });
   return _EventStream;
 });
@@ -96388,8 +96300,7 @@
     methods: () => ({
       matches: dart.definiteFunctionType(async.Stream$(T), [core.String]),
       listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-      capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()]),
-      asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()})
+      capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()])
     })
   });
   return _ElementListEventStreamImpl;
@@ -96551,7 +96462,6 @@
     }),
     methods: () => ({
       listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-      asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
       add: dart.definiteFunctionType(dart.void, [T])
     })
   });
@@ -96829,8 +96739,7 @@
 dart.addSimpleTypeTests(html._CustomKeyEventStreamImpl);
 html._CustomKeyEventStreamImpl[dart.implements] = () => [CustomStreamOfKeyEvent()];
 dart.setSignature(html._CustomKeyEventStreamImpl, {
-  constructors: () => ({new: dart.definiteFunctionType(html._CustomKeyEventStreamImpl, [core.String])}),
-  methods: () => ({add: dart.definiteFunctionType(dart.void, [html.KeyEvent])})
+  constructors: () => ({new: dart.definiteFunctionType(html._CustomKeyEventStreamImpl, [core.String])})
 });
 const _subscriptions = Symbol('_subscriptions');
 const _controller = Symbol('_controller');
@@ -98419,21 +98328,13 @@
     constructors: () => ({new: dart.definiteFunctionType(html._WrappedList$(E), [ListOfNode()])}),
     fields: () => ({[_list]: ListOfNode()}),
     getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(E), []),
       length: dart.definiteFunctionType(core.int, []),
       rawList: dart.definiteFunctionType(core.List$(html.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
-      add: dart.definiteFunctionType(dart.void, [E]),
       _get: dart.definiteFunctionType(E, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-      sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-      removeAt: dart.definiteFunctionType(E, [core.int]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-      replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [E])
+      _set: dart.definiteFunctionType(dart.void, [core.int, E])
     })
   });
   dart.defineExtensionMembers(_WrappedList, [
@@ -99786,25 +99687,12 @@
   getters: () => ({
     [_iterable]: dart.definiteFunctionType(core.Iterable$(html.Element), []),
     [_filtered]: dart.definiteFunctionType(core.List$(html.Element), []),
-    reversed: dart.definiteFunctionType(core.Iterable$(html.Element), []),
     length: dart.definiteFunctionType(core.int, []),
-    iterator: dart.definiteFunctionType(core.Iterator$(html.Element), []),
     rawList: dart.definiteFunctionType(core.List$(html.Node), [])
   }),
   setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
-    forEach: dart.definiteFunctionType(dart.void, [ElementTovoid()]),
     _set: dart.definiteFunctionType(dart.void, [core.int, html.Element]),
-    add: dart.definiteFunctionType(dart.void, [html.Element]),
-    addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-    sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-    setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-    fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html.Element]),
-    replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-    removeLast: dart.definiteFunctionType(html.Element, []),
-    insert: dart.definiteFunctionType(dart.void, [core.int, html.Element]),
-    insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-    removeAt: dart.definiteFunctionType(html.Element, [core.int]),
     _get: dart.definiteFunctionType(html.Element, [core.int])
   })
 });
@@ -103475,17 +103363,11 @@
 dart.setSignature(svg.LengthList, {
   constructors: () => ({_: dart.definiteFunctionType(svg.LengthList, [])}),
   fields: () => ({[dartx.numberOfItems]: core.int}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(svg.Length, []),
-    [dartx.last]: dart.definiteFunctionType(svg.Length, []),
-    [dartx.single]: dart.definiteFunctionType(svg.Length, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(svg.Length, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg.Length]),
-    [dartx.elementAt]: dart.definiteFunctionType(svg.Length, [core.int]),
     [__setter__]: dart.definiteFunctionType(dart.void, [core.int, svg.Length]),
     [dartx.appendItem]: dart.definiteFunctionType(svg.Length, [svg.Length]),
     [dartx.getItem]: dart.definiteFunctionType(svg.Length, [core.int]),
@@ -104081,17 +103963,11 @@
 dart.setSignature(svg.NumberList, {
   constructors: () => ({_: dart.definiteFunctionType(svg.NumberList, [])}),
   fields: () => ({[dartx.numberOfItems]: core.int}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(svg.Number, []),
-    [dartx.last]: dart.definiteFunctionType(svg.Number, []),
-    [dartx.single]: dart.definiteFunctionType(svg.Number, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(svg.Number, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg.Number]),
-    [dartx.elementAt]: dart.definiteFunctionType(svg.Number, [core.int]),
     [__setter__]: dart.definiteFunctionType(dart.void, [core.int, svg.Number]),
     [dartx.appendItem]: dart.definiteFunctionType(svg.Number, [svg.Number]),
     [dartx.getItem]: dart.definiteFunctionType(svg.Number, [core.int]),
@@ -105066,17 +104942,11 @@
 dart.setSignature(svg.PathSegList, {
   constructors: () => ({_: dart.definiteFunctionType(svg.PathSegList, [])}),
   fields: () => ({[dartx.numberOfItems]: core.int}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(svg.PathSeg, []),
-    [dartx.last]: dart.definiteFunctionType(svg.PathSeg, []),
-    [dartx.single]: dart.definiteFunctionType(svg.PathSeg, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(svg.PathSeg, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg.PathSeg]),
-    [dartx.elementAt]: dart.definiteFunctionType(svg.PathSeg, [core.int]),
     [__setter__]: dart.definiteFunctionType(dart.void, [core.int, svg.PathSeg]),
     [dartx.appendItem]: dart.definiteFunctionType(svg.PathSeg, [svg.PathSeg]),
     [dartx.getItem]: dart.definiteFunctionType(svg.PathSeg, [core.int]),
@@ -105831,17 +105701,11 @@
 dart.setSignature(svg.StringList, {
   constructors: () => ({_: dart.definiteFunctionType(svg.StringList, [])}),
   fields: () => ({[dartx.numberOfItems]: core.int}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(core.String, []),
-    [dartx.last]: dart.definiteFunctionType(core.String, []),
-    [dartx.single]: dart.definiteFunctionType(core.String, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-    [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
     [__setter__]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
     [dartx.appendItem]: dart.definiteFunctionType(core.String, [core.String]),
     [dartx.getItem]: dart.definiteFunctionType(core.String, [core.int]),
@@ -106715,17 +106579,11 @@
 dart.setSignature(svg.TransformList, {
   constructors: () => ({_: dart.definiteFunctionType(svg.TransformList, [])}),
   fields: () => ({[dartx.numberOfItems]: core.int}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(svg.Transform, []),
-    [dartx.last]: dart.definiteFunctionType(svg.Transform, []),
-    [dartx.single]: dart.definiteFunctionType(svg.Transform, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(svg.Transform, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg.Transform]),
-    [dartx.elementAt]: dart.definiteFunctionType(svg.Transform, [core.int]),
     [__setter__]: dart.definiteFunctionType(dart.void, [core.int, svg.Transform]),
     [dartx.appendItem]: dart.definiteFunctionType(svg.Transform, [svg.Transform]),
     [dartx.consolidate]: dart.definiteFunctionType(svg.Transform, []),
@@ -110762,17 +110620,11 @@
 web_sql.SqlResultSetRowList[dart.implements] = () => [ListOfMap()];
 dart.setSignature(web_sql.SqlResultSetRowList, {
   constructors: () => ({_: dart.definiteFunctionType(web_sql.SqlResultSetRowList, [])}),
-  getters: () => ({
-    [dartx.length]: dart.definiteFunctionType(core.int, []),
-    [dartx.first]: dart.definiteFunctionType(core.Map, []),
-    [dartx.last]: dart.definiteFunctionType(core.Map, []),
-    [dartx.single]: dart.definiteFunctionType(core.Map, [])
-  }),
+  getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
   setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
   methods: () => ({
     [dartx._get]: dart.definiteFunctionType(core.Map, [core.int]),
     [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.Map]),
-    [dartx.elementAt]: dart.definiteFunctionType(core.Map, [core.int]),
     [dartx.item]: dart.definiteFunctionType(core.Map, [core.int]),
     [_item_1]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
   })
diff --git a/pkg/dev_compiler/lib/js/legacy/dart_library.js b/pkg/dev_compiler/lib/js/legacy/dart_library.js
index 3b89a88..e940863 100644
--- a/pkg/dev_compiler/lib/js/legacy/dart_library.js
+++ b/pkg/dev_compiler/lib/js/legacy/dart_library.js
@@ -140,54 +140,6 @@
     // Force import of core.
     var dart_sdk = import_('dart_sdk');
 
-    // TODO(vsm): Move this to a shared location:
-    // https://github.com/dart-lang/sdk/issues/27605
-    if (typeof NodeList !== "undefined") {
-      // TODO(vsm): Do we still need these?
-      NodeList.prototype.get = function(i) { return this[i]; };
-      NamedNodeMap.prototype.get = function(i) { return this[i]; };
-      DOMTokenList.prototype.get = function(i) { return this[i]; };
-      HTMLCollection.prototype.get = function(i) { return this[i]; };
-
-      // Expose constructors for DOM types dart:html needs to assume are
-      // available on window.
-      if (typeof PannerNode == "undefined") {
-        let audioContext;
-        if (typeof AudioContext == "undefined" &&
-            (typeof webkitAudioContext != "undefined")) {
-          audioContext = new webkitAudioContext();
-        } else {
-          audioContext = new AudioContext();
-          window.StereoPannerNode =
-              audioContext.createStereoPanner().constructor;
-        }
-        window.PannerNode = audioContext.createPanner().constructor;
-      }
-      if (typeof AudioSourceNode == "undefined") {
-        window.AudioSourceNode = MediaElementAudioSourceNode.constructor;
-      }
-      if (typeof FontFaceSet == "undefined") {
-        window.FontFaceSet = document.fonts.__proto__.constructor;
-      }
-      if (typeof MemoryInfo == "undefined") {
-        if (typeof window.performance.memory != "undefined") {
-          window.MemoryInfo = window.performance.memory.constructor;
-        }
-      }
-      if (typeof Geolocation == "undefined") {
-        navigator.geolocation.constructor;
-      }
-      if (typeof Animation == "undefined") {
-        let d = document.createElement('div');
-        if (typeof d.animate != "undefined") {
-          window.Animation = d.animate(d).constructor;
-        }
-      }
-      if (typeof SourceBufferList == "undefined") {
-        window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
-      }
-    }
-
     // This import is only needed for chrome debugging. We should provide an
     // option to compile without it.
     dart_sdk._debugger.registerDevtoolsFormatter();
diff --git a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
index 029beee..ababd63 100644
--- a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
@@ -168,6 +168,8 @@
   let _AsyncBroadcastStreamController = () => (_AsyncBroadcastStreamController = dart.constFn(async._AsyncBroadcastStreamController$()))();
   let _AsBroadcastStreamController = () => (_AsBroadcastStreamController = dart.constFn(async._AsBroadcastStreamController$()))();
   let _DoneSubscription = () => (_DoneSubscription = dart.constFn(async._DoneSubscription$()))();
+  let FutureOr = () => (FutureOr = dart.constFn(async.FutureOr$()))();
+  let dynamicToFutureOr = () => (dynamicToFutureOr = dart.constFn(dart.functionType(async.FutureOr, [dart.dynamic])))();
   let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.functionType(dart.dynamic, [])))();
   let Future = () => (Future = dart.constFn(async.Future$()))();
   let Completer = () => (Completer = dart.constFn(async.Completer$()))();
@@ -388,14 +390,20 @@
   let ListOfListOfint = () => (ListOfListOfint = dart.constFn(core.List$(ListOfint())))();
   let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))();
   let FutureOfDirectory = () => (FutureOfDirectory = dart.constFn(async.Future$(io.Directory)))();
+  let FutureOrOfDirectory = () => (FutureOrOfDirectory = dart.constFn(async.FutureOr$(io.Directory)))();
   let StreamOfFileSystemEntity = () => (StreamOfFileSystemEntity = dart.constFn(async.Stream$(io.FileSystemEntity)))();
   let JSArrayOfFileSystemEntity = () => (JSArrayOfFileSystemEntity = dart.constFn(_interceptors.JSArray$(io.FileSystemEntity)))();
+  let FutureOrOfString = () => (FutureOrOfString = dart.constFn(async.FutureOr$(core.String)))();
+  let FutureOrOfbool = () => (FutureOrOfbool = dart.constFn(async.FutureOr$(core.bool)))();
+  let FutureOrOfint = () => (FutureOrOfint = dart.constFn(async.FutureOr$(core.int)))();
   let ListOfFileSystemEntity = () => (ListOfFileSystemEntity = dart.constFn(core.List$(io.FileSystemEntity)))();
   let StreamControllerOfListOfint = () => (StreamControllerOfListOfint = dart.constFn(async.StreamController$(ListOfint())))();
   let FutureOfRandomAccessFile = () => (FutureOfRandomAccessFile = dart.constFn(async.Future$(io.RandomAccessFile)))();
   let CompleterOfFile = () => (CompleterOfFile = dart.constFn(async.Completer$(io.File)))();
   let FutureOfListOfint = () => (FutureOfListOfint = dart.constFn(async.Future$(ListOfint())))();
+  let FutureOrOfFile = () => (FutureOrOfFile = dart.constFn(async.FutureOr$(io.File)))();
   let FutureOfFile = () => (FutureOfFile = dart.constFn(async.Future$(io.File)))();
+  let FutureOrOfListOfint = () => (FutureOrOfListOfint = dart.constFn(async.FutureOr$(ListOfint())))();
   let ListOfFileSystemEntityType = () => (ListOfFileSystemEntityType = dart.constFn(core.List$(io.FileSystemEntityType)))();
   let StreamOfHttpRequest = () => (StreamOfHttpRequest = dart.constFn(async.Stream$(io.HttpRequest)))();
   let ListOfRedirectInfo = () => (ListOfRedirectInfo = dart.constFn(core.List$(io.RedirectInfo)))();
@@ -404,6 +412,7 @@
   let StringAndListOfStringTovoid = () => (StringAndListOfStringTovoid = dart.constFn(dart.functionType(dart.void, [core.String, ListOfString()])))();
   let FutureOfHttpClientResponse = () => (FutureOfHttpClientResponse = dart.constFn(async.Future$(io.HttpClientResponse)))();
   let StreamSubscriptionOfListOfint = () => (StreamSubscriptionOfListOfint = dart.constFn(async.StreamSubscription$(ListOfint())))();
+  let FutureOrOfHttpClientResponse = () => (FutureOrOfHttpClientResponse = dart.constFn(async.FutureOr$(io.HttpClientResponse)))();
   let _StreamSinkImpl = () => (_StreamSinkImpl = dart.constFn(io._StreamSinkImpl$()))();
   let StreamConsumerOfListOfint = () => (StreamConsumerOfListOfint = dart.constFn(async.StreamConsumer$(ListOfint())))();
   let _HttpOutboundMessage = () => (_HttpOutboundMessage = dart.constFn(io._HttpOutboundMessage$()))();
@@ -415,11 +424,13 @@
   let FutureOfSecureSocket = () => (FutureOfSecureSocket = dart.constFn(async.Future$(io.SecureSocket)))();
   let HashSetOf_HttpClientConnection = () => (HashSetOf_HttpClientConnection = dart.constFn(collection.HashSet$(io._HttpClientConnection)))();
   let FutureOf_ConnectionInfo = () => (FutureOf_ConnectionInfo = dart.constFn(async.Future$(io._ConnectionInfo)))();
+  let FutureOrOf_ConnectionInfo = () => (FutureOrOf_ConnectionInfo = dart.constFn(async.FutureOr$(io._ConnectionInfo)))();
   let SetOf_HttpClientConnection = () => (SetOf_HttpClientConnection = dart.constFn(core.Set$(io._HttpClientConnection)))();
   let HashMapOfString$_ConnectionTarget = () => (HashMapOfString$_ConnectionTarget = dart.constFn(collection.HashMap$(core.String, io._ConnectionTarget)))();
   let JSArrayOf_Credentials = () => (JSArrayOf_Credentials = dart.constFn(_interceptors.JSArray$(io._Credentials)))();
   let JSArrayOf_ProxyCredentials = () => (JSArrayOf_ProxyCredentials = dart.constFn(_interceptors.JSArray$(io._ProxyCredentials)))();
   let FutureOf_HttpClientRequest = () => (FutureOf_HttpClientRequest = dart.constFn(async.Future$(io._HttpClientRequest)))();
+  let FutureOrOf_HttpClientRequest = () => (FutureOrOf_HttpClientRequest = dart.constFn(async.FutureOr$(io._HttpClientRequest)))();
   let X509CertificateAndStringAndintTobool = () => (X509CertificateAndStringAndintTobool = dart.constFn(dart.functionType(core.bool, [io.X509Certificate, core.String, core.int])))();
   let FutureOfbool = () => (FutureOfbool = dart.constFn(async.Future$(core.bool)))();
   let UriAndStringAndStringToFutureOfbool = () => (UriAndStringAndStringToFutureOfbool = dart.constFn(dart.functionType(FutureOfbool(), [core.Uri, core.String, core.String])))();
@@ -547,6 +558,7 @@
   let EventStreamProviderOfMidiMessageEvent = () => (EventStreamProviderOfMidiMessageEvent = dart.constFn(html$.EventStreamProvider$(html$.MidiMessageEvent)))();
   let ListOfMimeType = () => (ListOfMimeType = dart.constFn(core.List$(html$.MimeType)))();
   let ListOfMutationRecord = () => (ListOfMutationRecord = dart.constFn(core.List$(html$.MutationRecord)))();
+  let _wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = () => (_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = dart.constFn(html$._wrapZoneBinaryCallback$(ListOfMutationRecord(), html$.MutationObserver, dart.void)))();
   let MapOfString$bool = () => (MapOfString$bool = dart.constFn(core.Map$(core.String, core.bool)))();
   let CompleterOfMediaStream = () => (CompleterOfMediaStream = dart.constFn(async.Completer$(html$.MediaStream)))();
   let NodeTobool = () => (NodeTobool = dart.constFn(dart.functionType(core.bool, [html$.Node])))();
@@ -634,6 +646,7 @@
   let dynamicTodynamic$ = () => (dynamicTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
   let StringAndStringToint = () => (StringAndStringToint = dart.constFn(dart.definiteFunctionType(core.int, [core.String, core.String])))();
   let VoidTo_MethodStats = () => (VoidTo_MethodStats = dart.constFn(dart.definiteFunctionType(dart._MethodStats, [])))();
+  let VoidToFunctionType = () => (VoidToFunctionType = dart.constFn(dart.definiteFunctionType(dart.FunctionType, [])))();
   let dynamicToString = () => (dynamicToString = dart.constFn(dart.definiteFunctionType(core.String, [dart.dynamic])))();
   let dynamicToListOfString = () => (dynamicToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [dart.dynamic])))();
   let dynamicToList = () => (dynamicToList = dart.constFn(dart.definiteFunctionType(core.List, [dart.dynamic])))();
@@ -669,8 +682,9 @@
   let VoidTobool = () => (VoidTobool = dart.constFn(dart.definiteFunctionType(core.bool, [])))();
   let VoidTo_IsolateContext = () => (VoidTo_IsolateContext = dart.constFn(dart.definiteFunctionType(_isolate_helper._IsolateContext, [])))();
   let VoidTovoid$ = () => (VoidTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
-  let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.List])))();
+  let ListToFutureOr = () => (ListToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [core.List])))();
   let StringTodynamic = () => (StringTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.String])))();
+  let dynamicToFutureOr$ = () => (dynamicToFutureOr$ = dart.constFn(dart.definiteFunctionType(async.FutureOr, [dart.dynamic])))();
   let TimerTovoid$ = () => (TimerTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [async.Timer])))();
   let dynamicToFuture = () => (dynamicToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [dart.dynamic])))();
   let boolTodynamic = () => (boolTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.bool])))();
@@ -796,11 +810,15 @@
   let ListAndintAndintTo_BufferAndStart = () => (ListAndintAndintTo_BufferAndStart = dart.constFn(dart.definiteFunctionType(io._BufferAndStart, [core.List, core.int, core.int])))();
   let intTovoid = () => (intTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.int])))();
   let DirectoryToFutureOfDirectory = () => (DirectoryToFutureOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOfDirectory(), [io.Directory])))();
+  let boolToFutureOrOfDirectory = () => (boolToFutureOrOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOrOfDirectory(), [core.bool])))();
   let dynamicTo_Directory = () => (dynamicTo_Directory = dart.constFn(dart.definiteFunctionType(io._Directory, [dart.dynamic])))();
   let dynamicToDirectory = () => (dynamicToDirectory = dart.constFn(dart.definiteFunctionType(io.Directory, [dart.dynamic])))();
-  let ListOfintTodynamic = () => (ListOfintTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [ListOfint()])))();
+  let dynamicToFutureOrOfString = () => (dynamicToFutureOrOfString = dart.constFn(dart.definiteFunctionType(FutureOrOfString(), [dart.dynamic])))();
+  let dynamicToFutureOrOfbool = () => (dynamicToFutureOrOfbool = dart.constFn(dart.definiteFunctionType(FutureOrOfbool(), [dart.dynamic])))();
+  let dynamicToFutureOrOfint = () => (dynamicToFutureOrOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfint(), [dart.dynamic])))();
+  let ListOfintToFutureOr = () => (ListOfintToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [ListOfint()])))();
   let RandomAccessFileTovoid = () => (RandomAccessFileTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.RandomAccessFile])))();
-  let RandomAccessFileTodynamic = () => (RandomAccessFileTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RandomAccessFile])))();
+  let RandomAccessFileToFutureOr = () => (RandomAccessFileToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RandomAccessFile])))();
   let ListOfintTovoid$ = () => (ListOfintTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint()])))();
   let RandomAccessFileToFutureOfRandomAccessFile = () => (RandomAccessFileToFutureOfRandomAccessFile = dart.constFn(dart.definiteFunctionType(FutureOfRandomAccessFile(), [io.RandomAccessFile])))();
   let dynamicTo_File = () => (dynamicTo_File = dart.constFn(dart.definiteFunctionType(io._File, [dart.dynamic])))();
@@ -814,6 +832,8 @@
   let ListOfintToString = () => (ListOfintToString = dart.constFn(dart.definiteFunctionType(core.String, [ListOfint()])))();
   let RandomAccessFileTo_File = () => (RandomAccessFileTo_File = dart.constFn(dart.definiteFunctionType(io._File, [io.RandomAccessFile])))();
   let RandomAccessFileToObject = () => (RandomAccessFileToObject = dart.constFn(dart.definiteFunctionType(core.Object, [io.RandomAccessFile])))();
+  let RandomAccessFileToFutureOrOfFile = () => (RandomAccessFileToFutureOrOfFile = dart.constFn(dart.definiteFunctionType(FutureOrOfFile(), [io.RandomAccessFile])))();
+  let dynamicToFutureOrOfListOfint = () => (dynamicToFutureOrOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfListOfint(), [dart.dynamic])))();
   let dynamicToFileStat = () => (dynamicToFileStat = dart.constFn(dart.definiteFunctionType(io.FileStat, [dart.dynamic])))();
   let StringAndListOfStringToListOfString = () => (StringAndListOfStringToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [core.String, ListOfString()])))();
   let StringAndListOfStringTovoid$ = () => (StringAndListOfStringTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, ListOfString()])))();
@@ -826,22 +846,25 @@
   let _AuthenticationSchemeTo_Credentials = () => (_AuthenticationSchemeTo_Credentials = dart.constFn(dart.definiteFunctionType(io._Credentials, [io._AuthenticationScheme])))();
   let _CredentialsTovoid = () => (_CredentialsTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io._Credentials])))();
   let _AuthenticationSchemeAndStringToFuture = () => (_AuthenticationSchemeAndStringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [io._AuthenticationScheme, core.String])))();
+  let dynamicToFutureOrOfHttpClientResponse = () => (dynamicToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [dart.dynamic])))();
   let CookieTovoid = () => (CookieTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.Cookie])))();
+  let ListToFutureOrOfHttpClientResponse = () => (ListToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [core.List])))();
   let HttpClientResponseTovoid = () => (HttpClientResponseTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.HttpClientResponse])))();
   let dynamicToIterable = () => (dynamicToIterable = dart.constFn(dart.definiteFunctionType(core.Iterable, [dart.dynamic])))();
   let dynamicTo_HttpOutboundMessage = () => (dynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic])))();
   let dynamicAnddynamicTo_HttpOutboundMessage = () => (dynamicAnddynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic, dart.dynamic])))();
   let dynamic__Todynamic$ = () => (dynamic__Todynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [core.StackTrace])))();
   let _HttpIncomingTovoid$ = () => (_HttpIncomingTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [io._HttpIncoming])))();
-  let _HttpIncomingTodynamic = () => (_HttpIncomingTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._HttpIncoming])))();
+  let _HttpIncomingToFutureOr = () => (_HttpIncomingToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._HttpIncoming])))();
   let dynamicTo_DetachedSocket = () => (dynamicTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic])))();
   let SecureSocketTo_HttpClientConnection = () => (SecureSocketTo_HttpClientConnection = dart.constFn(dart.definiteFunctionType(io._HttpClientConnection, [io.SecureSocket])))();
   let HttpClientResponseToFutureOfSecureSocket = () => (HttpClientResponseToFutureOfSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfSecureSocket(), [io.HttpClientResponse])))();
   let X509CertificateTobool$ = () => (X509CertificateTobool$ = dart.constFn(dart.definiteFunctionType(core.bool, [io.X509Certificate])))();
   let _HttpClientConnectionTo_ConnectionInfo = () => (_HttpClientConnectionTo_ConnectionInfo = dart.constFn(dart.definiteFunctionType(io._ConnectionInfo, [io._HttpClientConnection])))();
+  let dynamicToFutureOrOf_ConnectionInfo = () => (dynamicToFutureOrOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOrOf_ConnectionInfo(), [dart.dynamic])))();
   let _ConnectionTargetTobool = () => (_ConnectionTargetTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io._ConnectionTarget])))();
   let _ConnectionInfoTo_HttpClientRequest = () => (_ConnectionInfoTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._ConnectionInfo])))();
-  let _ConnectionInfoTodynamic = () => (_ConnectionInfoTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._ConnectionInfo])))();
+  let _ConnectionInfoToFutureOrOf_HttpClientRequest = () => (_ConnectionInfoToFutureOrOf_HttpClientRequest = dart.constFn(dart.definiteFunctionType(FutureOrOf_HttpClientRequest(), [io._ConnectionInfo])))();
   let _HttpClientRequestTo_HttpClientRequest = () => (_HttpClientRequestTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._HttpClientRequest])))();
   let VoidTo_ConnectionTarget = () => (VoidTo_ConnectionTarget = dart.constFn(dart.definiteFunctionType(io._ConnectionTarget, [])))();
   let dynamicToFutureOf_ConnectionInfo = () => (dynamicToFutureOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOf_ConnectionInfo(), [dart.dynamic])))();
@@ -864,9 +887,9 @@
   let RawSecureSocketToSecureSocket = () => (RawSecureSocketToSecureSocket = dart.constFn(dart.definiteFunctionType(io.SecureSocket, [io.RawSecureSocket])))();
   let dynamicToFutureOfRawSecureSocket = () => (dynamicToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [dart.dynamic])))();
   let RawServerSocketToRawSecureServerSocket = () => (RawServerSocketToRawSecureServerSocket = dart.constFn(dart.definiteFunctionType(io.RawSecureServerSocket, [io.RawServerSocket])))();
-  let RawSecureSocketTodynamic = () => (RawSecureSocketTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RawSecureSocket])))();
+  let RawSecureSocketToFutureOr = () => (RawSecureSocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RawSecureSocket])))();
   let RawSocketToFutureOfRawSecureSocket = () => (RawSocketToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [io.RawSocket])))();
-  let _FilterStatusTodynamic = () => (_FilterStatusTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._FilterStatus])))();
+  let _FilterStatusToFutureOr = () => (_FilterStatusToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._FilterStatus])))();
   let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.int, [core.int])))();
   let dynamicTo_FilterStatus = () => (dynamicTo_FilterStatus = dart.constFn(dart.definiteFunctionType(io._FilterStatus, [dart.dynamic])))();
   let ListOfintAndStringTovoid = () => (ListOfintAndStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint(), core.String])))();
@@ -878,6 +901,7 @@
   let StringToFuture = () => (StringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [core.String])))();
   let EventSinkOfListOfintTo_WebSocketOutgoingTransformer = () => (EventSinkOfListOfintTo_WebSocketOutgoingTransformer = dart.constFn(dart.definiteFunctionType(io._WebSocketOutgoingTransformer, [EventSinkOfListOfint()])))();
   let dynamicTo_WebSocketImpl = () => (dynamicTo_WebSocketImpl = dart.constFn(dart.definiteFunctionType(io._WebSocketImpl, [dart.dynamic])))();
+  let SocketToFutureOr = () => (SocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.Socket])))();
   let HttpClientResponseToFutureOfWebSocket = () => (HttpClientResponseToFutureOfWebSocket = dart.constFn(dart.definiteFunctionType(FutureOfWebSocket(), [io.HttpClientResponse])))();
   let HttpClientRequestToFutureOfHttpClientResponse = () => (HttpClientRequestToFutureOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOfHttpClientResponse(), [io.HttpClientRequest])))();
   let dynamicToMap = () => (dynamicToMap = dart.constFn(dart.definiteFunctionType(core.Map, [dart.dynamic])))();
@@ -900,7 +924,7 @@
   let EventTovoid$ = () => (EventTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [html$.Event])))();
   let RequestToFutureOfT = () => (RequestToFutureOfT = dart.constFn(dart.definiteFunctionType(T => [async.Future$(T), [indexed_db.Request]])))();
   let dynamicToTo = () => (dynamicToTo = dart.constFn(dart.definiteFunctionType(To => [To, [dart.dynamic]])))();
-  let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
+  let EventToFutureOr = () => (EventToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [html$.Event])))();
   let NodeTobool$ = () => (NodeTobool$ = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Node])))();
   let MapOfString$dynamicTobool = () => (MapOfString$dynamicTobool = dart.constFn(dart.definiteFunctionType(core.bool, [MapOfString$dynamic()])))();
   let UriAndListOfStringAnddynamicToFutureOfIsolate = () => (UriAndListOfStringAnddynamicToFutureOfIsolate = dart.constFn(dart.definiteFunctionType(FutureOfIsolate(), [core.Uri, ListOfString(), dart.dynamic])))();
@@ -934,6 +958,7 @@
   let SetOfStringTobool = () => (SetOfStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [SetOfString()])))();
   let SetOfStringTovoid = () => (SetOfStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [SetOfString()])))();
   let EventAndStringTobool = () => (EventAndStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Event, core.String])))();
+  let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
   let KeyEventTobool = () => (KeyEventTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.KeyEvent])))();
   let NodeValidatorTobool = () => (NodeValidatorTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.NodeValidator])))();
   let NodeAndNodeToint = () => (NodeAndNodeToint = dart.constFn(dart.definiteFunctionType(core.int, [html$.Node, html$.Node])))();
@@ -973,6 +998,27 @@
           dart.copyProperties(s, m[dart._methodSig]);
         }
         return s;
+      },
+      fields: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._fieldSig]);
+        }
+        return s;
+      },
+      getters: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._getterSig]);
+        }
+        return s;
+      },
+      setters: () => {
+        let s = {};
+        for (let m of mixins) {
+          dart.copyProperties(s, m[dart._setterSig]);
+        }
+        return s;
       }
     });
     Mixin[dart._mixins] = mixins;
@@ -1075,15 +1121,24 @@
   dart.getGenericTypeCtor = function(value) {
     return value[dart._genericTypeCtor];
   };
-  dart.getMethodType = function(obj, name) {
-    let type = obj == null ? core.Object : obj.__proto__.constructor;
-    return dart.getMethodTypeFromType(type, name);
+  dart.getType = function(obj) {
+    return obj == null ? core.Object : obj.__proto__.constructor;
   };
-  dart.getMethodTypeFromType = function(type, name) {
+  dart.getMethodType = function(type, name) {
     let sigObj = type[dart._methodSig];
     if (sigObj === void 0) return void 0;
     return sigObj[name];
   };
+  dart.getFieldType = function(type, name) {
+    let sigObj = type[dart._fieldSig];
+    if (sigObj === void 0) return void 0;
+    return sigObj[name];
+  };
+  dart.getSetterType = function(type, name) {
+    let sigObj = type[dart._setterSig];
+    if (sigObj === void 0) return void 0;
+    return sigObj[name];
+  };
   dart.classGetConstructorType = function(cls, name) {
     if (!name) name = 'new';
     if (cls === void 0) return void 0;
@@ -1095,7 +1150,7 @@
   dart.bind = function(obj, name, f) {
     if (f === void 0) f = obj[name];
     f = f.bind(obj);
-    let sig = dart.getMethodType(obj, name);
+    let sig = dart.getMethodType(dart.getType(obj), name);
     dart.assert(sig);
     dart.tag(f, sig);
     return f;
@@ -1109,7 +1164,8 @@
   dart._setInstanceSignature = function(f, sigF, kind) {
     dart.defineMemoizedGetter(f, kind, () => {
       let sigObj = sigF();
-      sigObj.__proto__ = f.__proto__[kind];
+      let proto = f.__proto__;
+      sigObj.__proto__ = kind in proto ? proto[kind] : null;
       return sigObj;
     });
   };
@@ -1170,8 +1226,22 @@
     dart._setStaticSetterSignature(f, staticSetters);
     dart._setStaticTypes(f, names);
   };
-  dart.hasMethod = function(obj, name) {
-    return dart.getMethodType(obj, name) !== void 0;
+  dart._hasSigEntry = function(type, sigF, name) {
+    let sigObj = type[sigF];
+    if (sigObj === void 0) return false;
+    return name in sigObj;
+  };
+  dart.hasMethod = function(type, name) {
+    return dart._hasSigEntry(type, dart._methodSig, name);
+  };
+  dart.hasGetter = function(type, name) {
+    return dart._hasSigEntry(type, dart._getterSig, name);
+  };
+  dart.hasSetter = function(type, name) {
+    return dart._hasSigEntry(type, dart._setterSig, name);
+  };
+  dart.hasField = function(type, name) {
+    return dart._hasSigEntry(type, dart._fieldSig, name);
   };
   dart.defineNamedConstructor = function(clazz, name) {
     let proto = clazz.prototype;
@@ -1232,9 +1302,15 @@
     if (!jsProto) return;
     jsProto[dart._extensionType] = dartExtType;
     dart._installProperties(jsProto, extProto);
-    let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, dart._methodSig).get;
-    dart.assert(originalSigFn);
-    dart.defineMemoizedGetter(jsType, dart._methodSig, originalSigFn);
+    function updateSig(sigF) {
+      let originalSigFn = dart.getOwnPropertyDescriptor(dartExtType, sigF).get;
+      dart.assert(originalSigFn);
+      dart.defineMemoizedGetter(jsType, sigF, originalSigFn);
+    }
+    updateSig(dart._methodSig);
+    updateSig(dart._fieldSig);
+    updateSig(dart._getterSig);
+    updateSig(dart._setterSig);
   };
   dart.defineExtensionMembers = function(type, methodNames) {
     let proto = type.prototype;
@@ -1242,14 +1318,23 @@
       let method = dart.getOwnPropertyDescriptor(proto, name);
       dart.defineProperty(proto, dart.getExtensionSymbol(name), method);
     }
-    let originalSigFn = dart.getOwnPropertyDescriptor(type, dart._methodSig).get;
-    dart.defineMemoizedGetter(type, dart._methodSig, function() {
-      let sig = originalSigFn();
-      for (let name of methodNames) {
-        sig[dart.getExtensionSymbol(name)] = sig[name];
-      }
-      return sig;
-    });
+    function upgradeSig(sigF) {
+      let originalSigFn = dart.getOwnPropertyDescriptor(type, sigF).get;
+      dart.defineMemoizedGetter(type, sigF, function() {
+        let sig = originalSigFn();
+        let propertyNames = Object.getOwnPropertyNames(sig);
+        for (let name of methodNames) {
+          if (name in sig) {
+            sig[dart.getExtensionSymbol(name)] = sig[name];
+          }
+        }
+        return sig;
+      });
+    }
+    upgradeSig(dart._methodSig);
+    upgradeSig(dart._fieldSig);
+    upgradeSig(dart._getterSig);
+    upgradeSig(dart._setterSig);
   };
   dart.setType = function(obj, type) {
     obj.__proto__ = type.prototype;
@@ -1450,6 +1535,65 @@
       return dart._asInstanceOfLazyJSType(object, this);
     };
   };
+  dart._memoizeArray = function(map, arr, create) {
+    let len = arr.length;
+    map = dart._lookupNonTerminal(map, len);
+    for (var i = 0; i < len - 1; ++i) {
+      map = dart._lookupNonTerminal(map, arr[i]);
+    }
+    let result = map.get(arr[len - 1]);
+    if (result !== void 0) return result;
+    map.set(arr[len - 1], result = create());
+    return result;
+  };
+  dart._normalizeParameter = function(a) {
+    if (a instanceof Array) {
+      let result = [];
+      result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
+      result.push(a.slice(1));
+      return result;
+    }
+    return a == dart.dynamic ? dart.bottom : a;
+  };
+  dart._canonicalizeArray = function(definite, array, map) {
+    let arr = definite ? array : array.map(dart._normalizeParameter);
+    return dart._memoizeArray(map, arr, () => arr);
+  };
+  dart._canonicalizeNamed = function(definite, named, map) {
+    let key = [];
+    let names = dart.getOwnPropertyNames(named);
+    let r = {};
+    for (var i = 0; i < names.length; ++i) {
+      let name = names[i];
+      let type = named[name];
+      if (!definite) r[name] = type = dart._normalizeParameter(type);
+      key.push(name);
+      key.push(type);
+    }
+    if (!definite) named = r;
+    return dart._memoizeArray(map, key, () => named);
+  };
+  dart._lookupNonTerminal = function(map, key) {
+    let result = map.get(key);
+    if (result !== void 0) return result;
+    map.set(key, result = new Map());
+    return result;
+  };
+  dart._createSmall = function(count, definite, returnType, required) {
+    let map = dart._fnTypeSmallMap[count];
+    let args = definite ? required : required.map(dart._normalizeParameter);
+    for (var i = 0; i < count; ++i) {
+      map = dart._lookupNonTerminal(map, args[i]);
+    }
+    let result = map.get(returnType);
+    if (result !== void 0) return result;
+    result = new dart.FunctionType(returnType, args, [], {});
+    map.set(returnType, result);
+    return result;
+  };
+  dart.typedef = function(name, closure) {
+    return new dart.Typedef(name, closure);
+  };
   dart._functionType = function(definite, returnType, args, extra) {
     if (args === void 0 && extra === void 0) {
       const fnTypeParts = returnType;
@@ -1468,9 +1612,6 @@
   dart.definiteFunctionType = function(returnType, args, extra) {
     return dart._functionType(true, returnType, args, extra);
   };
-  dart.typedef = function(name, closure) {
-    return new dart.Typedef(name, closure);
-  };
   dart.typeName = function(type) {
     if (type === void 0) return "undefined type";
     if (type === null) return "null type";
@@ -1506,17 +1647,17 @@
   };
   dart.getImplicitFunctionType = function(type) {
     if (dart.test(dart.isFunctionType(type))) return type;
-    return dart.getMethodTypeFromType(type, 'call');
+    return dart.getMethodType(type, 'call');
   };
   dart.isFunctionType = function(type) {
     return type instanceof dart.AbstractFunctionType || type === core.Function;
   };
-  dart.isLazyJSSubtype = function(t1, t2, covariant) {
+  dart.isLazyJSSubtype = function(t1, t2, isCovariant) {
     if (dart.equals(t1, t2)) return true;
     if (t1[_jsTypeCallback] == null || t2[_jsTypeCallback] == null) return true;
-    return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], covariant);
+    return dart.isClassSubType(t1[_rawJSType], t2[_rawJSType], isCovariant);
   };
-  dart.isFunctionSubtype = function(ft1, ft2, covariant) {
+  dart.isFunctionSubtype = function(ft1, ft2, isCovariant) {
     if (ft2 === core.Function) {
       return true;
     }
@@ -1528,26 +1669,26 @@
     let args1 = ft1.args;
     let args2 = ft2.args;
     if (args1.length > args2.length) {
-      return covariant ? false : null;
+      return isCovariant ? false : null;
     }
     for (let i = 0; i < args1.length; ++i) {
-      if (!dart._isSubtype(args2[i], args1[i], !covariant)) {
+      if (!dart._isSubtype(args2[i], args1[i], !isCovariant)) {
         return null;
       }
     }
     let optionals1 = ft1.optionals;
     let optionals2 = ft2.optionals;
     if (args1.length + optionals1.length < args2.length + optionals2.length) {
-      return covariant ? false : null;
+      return isCovariant ? false : null;
     }
     let j = 0;
     for (let i = args1.length; i < args2.length; ++i, ++j) {
-      if (!dart._isSubtype(args2[i], optionals1[j], !covariant)) {
+      if (!dart._isSubtype(args2[i], optionals1[j], !isCovariant)) {
         return null;
       }
     }
     for (let i = 0; i < optionals2.length; ++i, ++j) {
-      if (!dart._isSubtype(optionals2[i], optionals1[j], !covariant)) {
+      if (!dart._isSubtype(optionals2[i], optionals1[j], !isCovariant)) {
         return null;
       }
     }
@@ -1559,15 +1700,17 @@
       let n1 = named1[name];
       let n2 = named2[name];
       if (n1 === void 0) {
-        return covariant ? false : null;
+        return isCovariant ? false : null;
       }
-      if (!dart._isSubtype(n2, n1, !covariant)) {
+      if (!dart._isSubtype(n2, n1, !isCovariant)) {
         return null;
       }
     }
     if (ret2 === dart.void) return true;
-    if (ret1 === dart.void) return ret2 === dart.dynamic;
-    if (!dart._isSubtype(ret1, ret2, covariant)) return null;
+    if (ret1 === dart.void) {
+      return ret2 === dart.dynamic || ret2 === async.FutureOr;
+    }
+    if (!dart._isSubtype(ret1, ret2, isCovariant)) return null;
     return true;
   };
   dart._subtypeMemo = function(f) {
@@ -1590,9 +1733,12 @@
     return type == dart.bottom;
   };
   dart._isTop = function(type) {
+    if (dart.getGenericClass(type) === dart.getGenericClass(async.FutureOr)) {
+      return dart._isTop(dart.getGenericArgs(type)[0]);
+    }
     return type == core.Object || type == dart.dynamic;
   };
-  dart._isSubtype = function(t1, t2, covariant) {
+  dart._isSubtype = function(t1, t2, isCovariant) {
     if (t1 === t2) return true;
     if (dart._isTop(t2) || dart._isBottom(t1)) {
       return true;
@@ -1603,20 +1749,20 @@
       return false;
     }
     if (!(t1 instanceof dart.AbstractFunctionType) && !(t2 instanceof dart.AbstractFunctionType)) {
-      let result = dart.isClassSubType(t1, t2, covariant);
+      let result = dart.isClassSubType(t1, t2, isCovariant);
       if (result === true || result === null) return result;
     }
     t1 = dart.getImplicitFunctionType(t1);
     if (!t1) return false;
     if (dart.isFunctionType(t1) && dart.isFunctionType(t2)) {
-      return dart.isFunctionSubtype(t1, t2, covariant);
+      return dart.isFunctionSubtype(t1, t2, isCovariant);
     }
     if (t1 instanceof dart.LazyJSType && t2 instanceof dart.LazyJSType) {
-      return dart.isLazyJSSubtype(t1, t2, covariant);
+      return dart.isLazyJSSubtype(t1, t2, isCovariant);
     }
     return false;
   };
-  dart.isClassSubType = function(t1, t2, covariant) {
+  dart.isClassSubType = function(t1, t2, isCovariant) {
     if (t1 == t2) return true;
     if (t1 == core.Object) return false;
     if (t1 == null) return t2 == core.Object || t2 == dart.dynamic;
@@ -1634,16 +1780,25 @@
       }
       dart.assert(length == typeArguments2.length);
       for (let i = 0; i < length; ++i) {
-        let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], covariant);
+        let result = dart._isSubtype(typeArguments1[i], typeArguments2[i], isCovariant);
         if (!result) {
           return result;
         }
       }
       return true;
     }
+    if (raw1 === dart.getGenericClass(async.FutureOr)) {
+      let t1TypeArg = dart.getGenericArgs(t1)[0];
+      let t1Future = dart.getGenericClass(async.Future)(t1TypeArg);
+      return dart.isSubtype(t1Future, t2) && dart.isSubtype(t1TypeArg, t2);
+    } else if (raw2 === dart.getGenericClass(async.FutureOr)) {
+      let t2TypeArg = dart.getGenericArgs(t2)[0];
+      let t2Future = dart.getGenericClass(async.Future)(t2TypeArg);
+      return dart.isSubtype(t1, t2Future) || dart.isSubtype(t1, t2TypeArg);
+    }
     let indefinite = false;
     function definitive(t1, t2) {
-      let result = dart.isClassSubType(t1, t2, covariant);
+      let result = dart.isClassSubType(t1, t2, isCovariant);
       if (result == null) {
         indefinite = true;
         return false;
@@ -1752,7 +1907,7 @@
       }
       return future.then(dart.dynamic)(onValue, {onError: onError});
     }
-    return dart.getGenericClass(async.Future)(T).new(function() {
+    return dart.getGenericClass(async.Future)(T).microtask(function() {
       iter = gen.apply(null, args)[Symbol.iterator]();
       return onValue();
     });
@@ -1764,18 +1919,32 @@
     let f = dart._canonicalMember(obj, field);
     dart._trackCall(obj);
     if (f != null) {
-      if (dart.test(dart.hasMethod(obj, f))) return dart.bind(obj, f, void 0);
-      return obj[f];
+      let type = dart.getType(obj);
+      if (dart.test(dart.hasField(type, f)) || dart.test(dart.hasGetter(type, f))) return obj[f];
+      if (dart.test(dart.hasMethod(type, f))) return dart.bind(obj, f, void 0);
     }
-    return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [], {isGetter: true}));
+    return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [], {isGetter: true}));
   };
   dart.dput = function(obj, field, value) {
     let f = dart._canonicalMember(obj, field);
     dart._trackCall(obj);
     if (f != null) {
-      return obj[f] = value;
+      let objType = dart.getType(obj);
+      let setterType = dart.getSetterType(objType, f);
+      if (setterType != void 0) {
+        if (dart.test(dart.instanceOfOrNull(value, setterType.args[0]))) {
+          return obj[f] = value;
+        }
+      } else {
+        let fieldType = dart.getFieldType(objType, f);
+        if (fieldType != void 0) {
+          if (dart.test(dart.instanceOfOrNull(value, fieldType))) {
+            return obj[f] = value;
+          }
+        }
+      }
     }
-    return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(field), [value], {isSetter: true}));
+    return dart.noSuchMethod(obj, new dart.InvocationImpl(field, [value], {isSetter: true}));
   };
   dart._checkApply = function(type, actuals) {
     if (actuals.length < type.args.length) return false;
@@ -1806,8 +1975,36 @@
     }
     return true;
   };
+  dart._toSymbolName = function(symbol) {
+    let str = symbol.toString();
+    return str.substring(7, str.length - 1);
+  };
+  dart._toDisplayName = function(name) {
+    if (name[0] === '_') {
+      switch (name) {
+        case '_get':
+        {
+          return '[]';
+        }
+        case '_set':
+        {
+          return '[]=';
+        }
+        case '_negate':
+        {
+          return 'unary-';
+        }
+        case '_constructor':
+        case '_prototype':
+        {
+          return name.substring(1);
+        }
+      }
+    }
+    return name;
+  };
   dart._dartSymbol = function(name) {
-    return dart.const(core.Symbol.new(name.toString()));
+    return core.Symbol._check(typeof name === "symbol" ? dart.const(new _internal.Symbol.es6(dart._toSymbolName(name), name)) : dart.const(core.Symbol.new(dart._toDisplayName(name))));
   };
   dart.extractNamedArgs = function(args) {
     if (args.length > 0) {
@@ -1826,7 +2023,7 @@
     }
     if (!(f instanceof Function)) {
       if (f != null) {
-        ftype = dart.getMethodType(f, 'call');
+        ftype = dart.getMethodType(dart.getType(f), 'call');
         f = f.call;
       }
       if (!(f instanceof Function)) {
@@ -1931,16 +2128,17 @@
       }
     }
     let actualTypeName = dart.typeName(actual);
-    let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(core.String._check(actualTypeName), src), VoidTo_MethodStats()));
+    let o = dart._callMethodStats[dartx.putIfAbsent](dart.str`${actualTypeName} <${src}>`, dart.fn(() => new dart._MethodStats(actualTypeName, src), VoidTo_MethodStats()));
     o.count = dart.notNull(o.count) + 1;
   };
   dart._callMethod = function(obj, name, typeArgs, args, displayName) {
     let symbol = dart._canonicalMember(obj, name);
     if (symbol == null) {
-      return dart.noSuchMethod(obj, new dart.InvocationImpl(core.String._check(displayName), core.List._check(args), {isMethod: true}));
+      return dart.noSuchMethod(obj, new dart.InvocationImpl(displayName, core.List._check(args), {isMethod: true}));
     }
     let f = obj != null ? obj[symbol] : null;
-    let ftype = dart.getMethodType(obj, symbol);
+    let type = dart.getType(obj);
+    let ftype = dart.getMethodType(type, symbol);
     return dart._checkAndCall(f, ftype, obj, typeArgs, args, displayName);
   };
   dart.dsend = function(obj, method, ...args) {
@@ -2331,7 +2529,56 @@
   dart.copyProperties = function(to, from) {
     return dart.copyTheseProperties(to, from, dart.getOwnNamesAndSymbols(from));
   };
-  dart.global = typeof window == "undefined" ? global : window;
+  dart.global = (function() {
+    if (typeof NodeList !== "undefined") {
+      NodeList.prototype.get = function(i) {
+        return this[i];
+      };
+      NamedNodeMap.prototype.get = function(i) {
+        return this[i];
+      };
+      DOMTokenList.prototype.get = function(i) {
+        return this[i];
+      };
+      HTMLCollection.prototype.get = function(i) {
+        return this[i];
+      };
+      if (typeof PannerNode == "undefined") {
+        let audioContext;
+        if (typeof AudioContext == "undefined" && typeof webkitAudioContext != "undefined") {
+          audioContext = new webkitAudioContext();
+        } else {
+          audioContext = new AudioContext();
+          window.StereoPannerNode = audioContext.createStereoPanner().constructor;
+        }
+        window.PannerNode = audioContext.createPanner().constructor;
+      }
+      if (typeof AudioSourceNode == "undefined") {
+        window.AudioSourceNode = MediaElementAudioSourceNode.__proto__;
+      }
+      if (typeof FontFaceSet == "undefined") {
+        window.FontFaceSet = document.fonts.__proto__.constructor;
+      }
+      if (typeof MemoryInfo == "undefined") {
+        if (typeof window.performance.memory != "undefined") {
+          window.MemoryInfo = window.performance.memory.constructor;
+        }
+      }
+      if (typeof Geolocation == "undefined") {
+        navigator.geolocation.constructor;
+      }
+      if (typeof Animation == "undefined") {
+        let d = document.createElement('div');
+        if (typeof d.animate != "undefined") {
+          window.Animation = d.animate(d).constructor;
+        }
+      }
+      if (typeof SourceBufferList == "undefined") {
+        window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
+      }
+    }
+    return typeof window == "undefined" ? global : window;
+  })();
   dart.JsSymbol = Symbol;
   dart._mixins = Symbol("mixins");
   dart.implements = Symbol("implements");
@@ -2483,196 +2730,186 @@
       this[_wrappedType] = wrappedType;
     }
     toString() {
-      return core.String._check(dart.typeName(this[_wrappedType]));
+      return dart.typeName(this[_wrappedType]);
     }
   };
   dart.setSignature(dart.WrappedType, {
     constructors: () => ({new: dart.definiteFunctionType(dart.WrappedType, [dart.dynamic])}),
     fields: () => ({[_wrappedType]: dart.dynamic})
   });
+  const _stringValue = Symbol('_stringValue');
   dart.AbstractFunctionType = class AbstractFunctionType extends dart.TypeRep {
-    constructor() {
-      super();
-      this._stringValue = null;
+    new() {
+      this[_stringValue] = null;
+      super.new();
     }
     toString() {
       return this.name;
     }
     get name() {
-      if (this._stringValue) return this._stringValue;
+      if (this[_stringValue] != null) return this[_stringValue];
       let buffer = '(';
       for (let i = 0; i < this.args.length; ++i) {
         if (i > 0) {
-          buffer += ', ';
+          buffer = dart.notNull(buffer) + ', ';
         }
-        buffer += dart.typeName(this.args[i]);
+        buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.args[i]));
       }
       if (this.optionals.length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '[';
+        if (this.args.length > 0) {
+          buffer = dart.notNull(buffer) + ', ';
+        }
+        buffer = dart.notNull(buffer) + '[';
         for (let i = 0; i < this.optionals.length; ++i) {
           if (i > 0) {
-            buffer += ', ';
+            buffer = dart.notNull(buffer) + ', ';
           }
-          buffer += dart.typeName(this.optionals[i]);
+          buffer = dart.notNull(buffer) + dart.notNull(dart.typeName(this.optionals[i]));
         }
-        buffer += ']';
+        buffer = dart.notNull(buffer) + ']';
       } else if (Object.keys(this.named).length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '{';
-        let names = dart.getOwnPropertyNames(this.named).sort();
+        if (this.args.length > 0) {
+          buffer = dart.notNull(buffer) + ', ';
+        }
+        buffer = dart.notNull(buffer) + '{';
+        let names = dart.getOwnPropertyNames(this.named);
+        names.sort();
         for (let i = 0; i < names.length; ++i) {
           if (i > 0) {
-            buffer += ', ';
+            buffer = dart.notNull(buffer) + ', ';
           }
-          buffer += names[i] + ': ' + dart.typeName(this.named[names[i]]);
+          let typeNameString = dart.typeName(this.named[names[i]]);
+          buffer = dart.notNull(buffer) + dart.str`${names[i]}: ${typeNameString}`;
         }
-        buffer += '}';
+        buffer = dart.notNull(buffer) + '}';
       }
-      buffer += ') -> ' + dart.typeName(this.returnType);
-      this._stringValue = buffer;
+      let returnTypeName = dart.typeName(this.returnType);
+      buffer = dart.notNull(buffer) + dart.str`) -> ${returnTypeName}`;
+      this[_stringValue] = buffer;
       return buffer;
     }
   };
+  dart.setSignature(dart.AbstractFunctionType, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.AbstractFunctionType, [])}),
+    fields: () => ({[_stringValue]: core.String})
+  });
   dart._fnTypeNamedArgMap = new Map();
   dart._fnTypeArrayArgMap = new Map();
   dart._fnTypeTypeMap = new Map();
   dart._fnTypeSmallMap = [new Map(), new Map(), new Map()];
+  const _process = Symbol('_process');
   dart.FunctionType = class FunctionType extends dart.AbstractFunctionType {
-    static _memoizeArray(map, arr, create) {
-      let len = arr.length;
-      map = FunctionType._lookupNonTerminal(map, len);
-      for (var i = 0; i < len - 1; ++i) {
-        map = FunctionType._lookupNonTerminal(map, arr[i]);
-      }
-      let result = map.get(arr[len - 1]);
-      if (result !== void 0) return result;
-      map.set(arr[len - 1], result = create());
-      return result;
-    }
-    static _normalizeParameter(a) {
-      if (a instanceof Array) {
-        let result = [];
-        result.push(a[0] == dart.dynamic ? dart.bottom : a[0]);
-        result.push(a.slice(1));
-        return result;
-      }
-      return a == dart.dynamic ? dart.bottom : a;
-    }
-    static _canonicalizeArray(definite, array, map) {
-      let arr = definite ? array : array.map(FunctionType._normalizeParameter);
-      return FunctionType._memoizeArray(map, arr, () => arr);
-    }
-    static _canonicalizeNamed(definite, named, map) {
-      let key = [];
-      let names = dart.getOwnPropertyNames(named);
-      let r = {};
-      for (var i = 0; i < names.length; ++i) {
-        let name = names[i];
-        let type = named[name];
-        if (!definite) r[name] = type = FunctionType._normalizeParameter(type);
-        key.push(name);
-        key.push(type);
-      }
-      if (!definite) named = r;
-      return FunctionType._memoizeArray(map, key, () => named);
-    }
-    static _lookupNonTerminal(map, key) {
-      let result = map.get(key);
-      if (result !== void 0) return result;
-      map.set(key, result = new Map());
-      return result;
-    }
-    static _createSmall(count, definite, returnType, required) {
-      let map = dart._fnTypeSmallMap[count];
-      let args = definite ? required : required.map(FunctionType._normalizeParameter);
-      for (var i = 0; i < count; ++i) {
-        map = FunctionType._lookupNonTerminal(map, args[i]);
-      }
-      let result = map.get(returnType);
-      if (result !== void 0) return result;
-      result = new FunctionType(returnType, args, [], {});
-      map.set(returnType, result);
-      return result;
-    }
     static create(definite, returnType, args, extra) {
       if (extra === void 0 && args.length < 3) {
-        return FunctionType._createSmall(args.length, definite, returnType, args);
+        return dart._createSmall(args.length, definite, returnType, args);
       }
-      args = FunctionType._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
-      let keys;
-      let create;
+      args = dart._canonicalizeArray(definite, args, dart._fnTypeArrayArgMap);
+      let keys = null;
+      let create = null;
       if (extra === void 0) {
         keys = [returnType, args];
-        create = () => new FunctionType(returnType, args, [], {});
+        create = dart.fn(() => new dart.FunctionType(returnType, args, [], {}), VoidToFunctionType());
       } else if (extra instanceof Array) {
-        let optionals = FunctionType._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
+        let optionals = dart._canonicalizeArray(definite, extra, dart._fnTypeArrayArgMap);
         keys = [returnType, args, optionals];
-        create = () => new FunctionType(returnType, args, optionals, {});
+        create = dart.fn(() => new dart.FunctionType(returnType, args, optionals, {}), VoidToFunctionType());
       } else {
-        let named = FunctionType._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
+        let named = dart._canonicalizeNamed(definite, extra, dart._fnTypeNamedArgMap);
         keys = [returnType, args, named];
-        create = () => new FunctionType(returnType, args, [], named);
+        create = dart.fn(() => new dart.FunctionType(returnType, args, [], named), VoidToFunctionType());
       }
-      return FunctionType._memoizeArray(dart._fnTypeTypeMap, keys, create);
+      return dart._memoizeArray(dart._fnTypeTypeMap, keys, create);
     }
-    constructor(returnType, args, optionals, named) {
-      super();
+    [_process](array, metadata) {
+      let result = [];
+      for (let i = 0; i < array.length; ++i) {
+        let arg = array[i];
+        if (arg instanceof Array) {
+          dart.dsend(metadata, 'add', arg.slice(1));
+          result[dartx.add](arg[0]);
+        } else {
+          metadata.push([]);
+          result.push(arg);
+        }
+      }
+      return result;
+    }
+    new(returnType, args, optionals, named) {
       this.returnType = returnType;
       this.args = args;
       this.optionals = optionals;
       this.named = named;
+      this.metadata = null;
+      super.new();
       this.metadata = [];
-      function process(array, metadata) {
-        var result = [];
-        for (var i = 0; i < array.length; ++i) {
-          var arg = array[i];
-          if (arg instanceof Array) {
-            metadata.push(arg.slice(1));
-            result.push(arg[0]);
-          } else {
-            metadata.push([]);
-            result.push(arg);
-          }
-        }
-        return result;
-      }
-      this.args = process(this.args, this.metadata);
-      this.optionals = process(this.optionals, this.metadata);
+      this.args = this[_process](this.args, this.metadata);
+      this.optionals = this[_process](this.optionals, this.metadata);
     }
   };
+  dart.setSignature(dart.FunctionType, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.FunctionType, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+    fields: () => ({
+      returnType: dart.dynamic,
+      args: dart.dynamic,
+      optionals: dart.dynamic,
+      named: dart.dynamic,
+      metadata: dart.dynamic
+    }),
+    methods: () => ({[_process]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])}),
+    statics: () => ({create: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic])}),
+    names: ['create']
+  });
+  const _name = Symbol('_name');
+  const _closure = Symbol('_closure');
+  const _functionType = Symbol('_functionType');
   dart.Typedef = class Typedef extends dart.AbstractFunctionType {
-    constructor(name, closure) {
-      super();
-      this._name = name;
-      this._closure = closure;
-      this._functionType = null;
+    new(name, closure) {
+      this[_name] = name;
+      this[_closure] = closure;
+      this[_functionType] = null;
+      super.new();
     }
     get name() {
-      return this._name;
+      return core.String._check(this[_name]);
     }
     get functionType() {
-      if (!this._functionType) {
-        this._functionType = this._closure();
+      if (this[_functionType] == null) {
+        this[_functionType] = this[_closure]();
       }
-      return this._functionType;
+      return this[_functionType];
     }
     get returnType() {
       return this.functionType.returnType;
     }
     get args() {
-      return this.functionType.args;
+      return core.List._check(this.functionType.args);
     }
     get optionals() {
-      return this.functionType.optionals;
+      return core.List._check(this.functionType.optionals);
     }
     get named() {
       return this.functionType.named;
     }
     get metadata() {
-      return this.functionType.metadata;
+      return core.List._check(this.functionType.metadata);
     }
   };
+  dart.setSignature(dart.Typedef, {
+    constructors: () => ({new: dart.definiteFunctionType(dart.Typedef, [dart.dynamic, dart.dynamic])}),
+    fields: () => ({
+      [_name]: dart.dynamic,
+      [_closure]: dart.dynamic,
+      [_functionType]: dart.AbstractFunctionType
+    }),
+    getters: () => ({
+      functionType: dart.definiteFunctionType(dart.AbstractFunctionType, []),
+      returnType: dart.definiteFunctionType(dart.dynamic, []),
+      args: dart.definiteFunctionType(core.List, []),
+      optionals: dart.definiteFunctionType(core.List, []),
+      named: dart.definiteFunctionType(dart.dynamic, []),
+      metadata: dart.definiteFunctionType(core.List, [])
+    })
+  });
   dart._typeFormalCount = Symbol("_typeFormalCount");
   dart.isSubtype = dart._subtypeMemo((t1, t2) => t1 === t2 || dart._isSubtype(t1, t2, true));
   dart._trapRuntimeErrors = true;
@@ -2808,7 +3045,7 @@
     }
   };
   dart.setSignature(dart.InvocationImpl, {
-    constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [core.String, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
+    constructors: () => ({new: dart.definiteFunctionType(dart.InvocationImpl, [dart.dynamic, core.List], {namedArguments: dart.dynamic, isMethod: core.bool, isGetter: core.bool, isSetter: core.bool})}),
     fields: () => ({
       memberName: core.Symbol,
       positionalArguments: core.List,
@@ -2952,8 +3189,8 @@
   dart.lazyFn(_debugger.getObjectTypeName, () => dynamicToString());
   _debugger.getTypeName = function(type) {
     let name = dart.typeName(type);
-    if (dart.equals(name, 'JSArray<dynamic>') || dart.equals(name, 'JSObject<Array>')) return 'List<dynamic>';
-    return core.String._check(name);
+    if (name == 'JSArray<dynamic>' || name == 'JSObject<Array>') return 'List<dynamic>';
+    return name;
   };
   dart.lazyFn(_debugger.getTypeName, () => TypeToString());
   _debugger._getType = function(object) {
@@ -3501,7 +3738,7 @@
       return true;
     }
     preview(object) {
-      return core.String._check(dart.typeName(dart.getReifiedType(object)));
+      return dart.typeName(dart.getReifiedType(object));
     }
     children(object) {
       return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'signature', value: this.preview(object)}), new _debugger.NameValuePair({name: 'JavaScript Function', value: object, config: _debugger.JsonMLConfig.skipDart})]);
@@ -7212,30 +7449,8 @@
     ListIterable[dart.implements] = () => [_internal.EfficientLength];
     dart.setSignature(ListIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.ListIterable$(E), [])}),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
-      methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        every: dart.definiteFunctionType(core.bool, [ETobool()]),
-        any: dart.definiteFunctionType(core.bool, [ETobool()]),
-        firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        singleWhere: dart.definiteFunctionType(E, [ETobool()]),
-        where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-        reduce: dart.definiteFunctionType(E, [dynamicAndEToE()]),
-        fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+      methods: () => ({reduce: dart.definiteFunctionType(E, [dynamicAndEToE()])})
     });
     dart.defineExtensionMembers(ListIterable, [
       'forEach',
@@ -7361,12 +7576,6 @@
       getters: () => ({
         [_endIndex]: dart.definiteFunctionType(core.int, []),
         [_startIndex]: dart.definiteFunctionType(core.int, [])
-      }),
-      methods: () => ({
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool})
       })
     });
     dart.defineExtensionMembers(SubListIterable, [
@@ -7481,13 +7690,7 @@
         [_iterable$]: IterableOfS(),
         [_f]: _TransformationOfS$T()
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(T), []),
-        first: dart.definiteFunctionType(T, []),
-        last: dart.definiteFunctionType(T, []),
-        single: dart.definiteFunctionType(T, [])
-      }),
-      methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(T), [])})
     });
     dart.defineExtensionMembers(MappedIterable, [
       'elementAt',
@@ -7580,8 +7783,7 @@
       fields: () => ({
         [_source]: IterableOfS(),
         [_f]: _TransformationOfS$T()
-      }),
-      methods: () => ({elementAt: dart.definiteFunctionType(T, [core.int])})
+      })
     });
     dart.defineExtensionMembers(MappedListIterable, ['elementAt', 'length']);
     return MappedListIterable;
@@ -7930,8 +8132,7 @@
         [_iterable$]: IterableOfE(),
         [_skipCount]: core.int
       }),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({skip: dart.definiteFunctionType(core.Iterable$(E), [core.int])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(SkipIterable, ['skip', 'iterator']);
     return SkipIterable;
@@ -8157,31 +8358,8 @@
     EmptyIterable[dart.implements] = () => [_internal.EfficientLength];
     dart.setSignature(EmptyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.EmptyIterable$(E), [])}),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
-      methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        every: dart.definiteFunctionType(core.bool, [ETobool()]),
-        any: dart.definiteFunctionType(core.bool, [ETobool()]),
-        firstWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        lastWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()}),
-        where: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        map: dart.definiteFunctionType(T => [core.Iterable$(T), [dart.functionType(T, [E])]]),
-        reduce: dart.definiteFunctionType(E, [EAndEToE()]),
-        fold: dart.definiteFunctionType(T => [T, [T, dart.functionType(T, [T, E])]]),
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        skipWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        takeWhile: dart.definiteFunctionType(core.Iterable$(E), [ETobool()]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
+      methods: () => ({singleWhere: dart.definiteFunctionType(E, [ETobool()], {orElse: VoidToE()})})
     });
     dart.defineExtensionMembers(EmptyIterable, [
       'forEach',
@@ -8380,8 +8558,7 @@
   dart.addSimpleTypeTests(_internal._ListIndicesIterable);
   dart.setSignature(_internal._ListIndicesIterable, {
     constructors: () => ({new: dart.definiteFunctionType(_internal._ListIndicesIterable, [core.List])}),
-    fields: () => ({[_backedList]: core.List}),
-    methods: () => ({elementAt: dart.definiteFunctionType(core.int, [core.int])})
+    fields: () => ({[_backedList]: core.List})
   });
   dart.defineExtensionMembers(_internal._ListIndicesIterable, ['elementAt', 'length']);
   const _values = Symbol('_values');
@@ -8510,8 +8687,7 @@
     }
     dart.setSignature(ReversedListIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_internal.ReversedListIterable$(E), [IterableOfE()])}),
-      fields: () => ({[_source]: IterableOfE()}),
-      methods: () => ({elementAt: dart.definiteFunctionType(E, [core.int])})
+      fields: () => ({[_source]: IterableOfE()})
     });
     dart.defineExtensionMembers(ReversedListIterable, ['elementAt', 'length']);
     return ReversedListIterable;
@@ -8892,41 +9068,41 @@
     names: ['sort', 'sortRange', '_doSort', '_insertionSort', '_dualPivotQuicksort']
   });
   _internal.Sort._INSERTION_SORT_THRESHOLD = 32;
-  const _name = Symbol('_name');
+  const _name$ = Symbol('_name');
   const _nativeSymbol = Symbol('_nativeSymbol');
   _internal.Symbol = class Symbol extends core.Object {
     new(name) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = null;
     }
     es6(name, nativeSymbol) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = nativeSymbol;
     }
     unvalidated(name) {
-      this[_name] = name;
+      this[_name$] = name;
       this[_nativeSymbol] = null;
     }
     validated(name) {
-      this[_name] = _internal.Symbol.validatePublicSymbol(name);
+      this[_name$] = _internal.Symbol.validatePublicSymbol(name);
       this[_nativeSymbol] = null;
     }
     ['=='](other) {
-      return _internal.Symbol.is(other) && this[_name] == other[_name] && dart.equals(this[_nativeSymbol], other[_nativeSymbol]);
+      return _internal.Symbol.is(other) && this[_name$] == other[_name$] && dart.equals(this[_nativeSymbol], other[_nativeSymbol]);
     }
     get hashCode() {
       let hash = this._hashCode;
       if (hash != null) return hash;
       let arbitraryPrime = 664597;
-      hash = 536870911 & arbitraryPrime * dart.notNull(dart.hashCode(this[_name]));
+      hash = 536870911 & arbitraryPrime * dart.notNull(dart.hashCode(this[_name$]));
       this._hashCode = hash;
       return hash;
     }
     toString() {
-      return dart.str`Symbol("${this[_name]}")`;
+      return dart.str`Symbol("${this[_name$]}")`;
     }
     static getName(symbol) {
-      return symbol[_name];
+      return symbol[_name$];
     }
     static getNativeSymbol(symbol) {
       return symbol[_nativeSymbol];
@@ -8954,7 +9130,7 @@
       validated: dart.definiteFunctionType(_internal.Symbol, [core.String])
     }),
     fields: () => ({
-      [_name]: core.String,
+      [_name$]: core.String,
       [_nativeSymbol]: dart.dynamic
     }),
     methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])}),
@@ -9679,7 +9855,7 @@
       let replyPort = dart.dindex(msg, 'replyPort');
       _isolate_helper.IsolateNatives.spawn(core.String._check(dart.dindex(msg, 'functionName')), core.String._check(dart.dindex(msg, 'uri')), ListOfString()._check(dart.dindex(msg, 'args')), dart.dindex(msg, 'msg'), false, core.bool._check(dart.dindex(msg, 'isSpawnUri')), core.bool._check(dart.dindex(msg, 'startPaused'))).then(dart.dynamic)(dart.fn(msg => {
         dart.dsend(replyPort, 'send', msg);
-      }, ListTodynamic()), {onError: dart.fn(errorMessage => {
+      }, ListToFutureOr()), {onError: dart.fn(errorMessage => {
           dart.dsend(replyPort, 'send', JSArrayOfString().of([_isolate_helper._SPAWN_FAILED_SIGNAL, errorMessage]));
         }, StringTodynamic())});
     }
@@ -9738,7 +9914,7 @@
           dart.assert(dart.equals(dart.dindex(msg, 0), _isolate_helper._SPAWN_FAILED_SIGNAL));
           completer.completeError(dart.dindex(msg, 1));
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
       let signalReply = port.sendPort;
       if (dart.test(_isolate_helper._globalState.useWorkers) && !dart.test(isLight)) {
         _isolate_helper.IsolateNatives._startWorker(functionName, uri, args, message, isSpawnUri, startPaused, signalReply, dart.fn(message => completer.completeError(message), StringTovoid$()));
@@ -10077,6 +10253,7 @@
     let IterableOfT = () => (IterableOfT = dart.constFn(core.Iterable$(T)))();
     let intToT = () => (intToT = dart.constFn(dart.functionType(T, [core.int])))();
     let EventSinkOfTToEventSink = () => (EventSinkOfTToEventSink = dart.constFn(dart.functionType(async.EventSink, [EventSinkOfT()])))();
+    let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
     let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
     let VoidTo_IterablePendingEventsOfT = () => (VoidTo_IterablePendingEventsOfT = dart.constFn(dart.definiteFunctionType(_IterablePendingEventsOfT(), [])))();
     let TTovoid$ = () => (TTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [T])))();
@@ -10094,7 +10271,7 @@
         future.then(dart.dynamic)(dart.fn(value => {
           controller[_add$](value);
           controller[_closeUnchecked]();
-        }, TTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+        }, TToFutureOr()), {onError: dart.fn((error, stackTrace) => {
             controller[_addError](error, core.StackTrace._check(stackTrace));
             controller[_closeUnchecked]();
           }, dynamicAnddynamicTodynamic$())});
@@ -10216,7 +10393,7 @@
 
               if (async.Future.is(newValue)) {
                 subscription.pause();
-                newValue.then(dart.dynamic)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
+                newValue.then(dart.void)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
               } else {
                 controller.add(E.as(newValue));
               }
@@ -12678,12 +12855,6 @@
         return new Map();
       }
     }
-    dart.setSignature(Es6LinkedHashMap, {
-      methods: () => ({
-        [_getTableCell]: dart.definiteFunctionType(_js_helper.LinkedHashMapCell$(K, V), [dart.dynamic, dart.dynamic]),
-        [_getTableBucket]: dart.definiteFunctionType(core.List$(_js_helper.LinkedHashMapCell$(K, V)), [dart.dynamic, dart.dynamic])
-      })
-    });
     return Es6LinkedHashMap;
   });
   _js_helper.Es6LinkedHashMap = Es6LinkedHashMap();
@@ -12748,8 +12919,7 @@
     dart.setSignature(LinkedHashMapKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(_js_helper.LinkedHashMapKeyIterable$(E), [JsLinkedHashMapOfE$dynamic()])}),
       fields: () => ({[_map]: JsLinkedHashMapOfE$dynamic()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(LinkedHashMapKeyIterable, [
       'contains',
@@ -13197,10 +13367,7 @@
       [_pattern]: core.String,
       [_index$0]: core.int
     }),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.Iterator$(core.Match), []),
-      first: dart.definiteFunctionType(core.Match, [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(core.Match), [])})
   });
   dart.defineExtensionMembers(_js_helper._StringAllMatchesIterable, ['iterator', 'first']);
   _js_helper._StringAllMatchesIterator = class _StringAllMatchesIterator extends core.Object {
@@ -13515,7 +13682,31 @@
     if (privateSymbol != null) {
       return privateSymbol;
     }
-    return _js_mirrors.getName(symbol);
+    let name = _js_mirrors.getName(symbol);
+    switch (name) {
+      case '[]':
+      {
+        name = '_get';
+        break;
+      }
+      case '[]=':
+      {
+        name = '_set';
+        break;
+      }
+      case 'unary-':
+      {
+        name = '_negate';
+        break;
+      }
+      case 'constructor':
+      case 'prototype':
+      {
+        name = dart.str`_${name}`;
+        break;
+      }
+    }
+    return name;
   };
   dart.lazyFn(_js_mirrors._getMember, () => SymbolTodynamic());
   _js_mirrors._getNameForESSymbol = function(member) {
@@ -14059,21 +14250,21 @@
     })
   });
   const _symbol = Symbol('_symbol');
-  const _name$ = Symbol('_name');
+  const _name$0 = Symbol('_name');
   _js_mirrors.JsVariableMirror = class JsVariableMirror extends _js_mirrors.JsMirror {
     get simpleName() {
       return this[_symbol];
     }
     _(symbol, t, annotations) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.type = _js_mirrors.reflectType(t);
       this.metadata = ListOfInstanceMirror().unmodifiable(annotations[dartx.map](mirrors.InstanceMirror)(dart.fn(a => _js_mirrors.reflect(a), dynamicToInstanceMirror())));
       this.isStatic = false;
       this.isFinal = false;
     }
     toString() {
-      return dart.str`VariableMirror on '${this[_name$]}'`;
+      return dart.str`VariableMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14100,7 +14291,7 @@
     constructors: () => ({_: dart.definiteFunctionType(_js_mirrors.JsVariableMirror, [core.Symbol, core.Type, core.List])}),
     fields: () => ({
       [_symbol]: core.Symbol,
-      [_name$]: core.String,
+      [_name$0]: core.String,
       type: mirrors.TypeMirror,
       metadata: ListOfInstanceMirror(),
       isStatic: core.bool,
@@ -14113,7 +14304,7 @@
       super._(member, t, annotations);
     }
     toString() {
-      return dart.str`ParameterMirror on '${this[_name$]}'`;
+      return dart.str`ParameterMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14158,17 +14349,17 @@
   let const$4;
   _js_mirrors.JsMethodMirror = class JsMethodMirror extends _js_mirrors.JsMirror {
     get isSetter() {
-      return this[_name$][dartx.endsWith]('=');
+      return this[_name$0][dartx.endsWith]('=');
     }
     get isPrivate() {
-      return this[_name$][dartx.startsWith]('_');
+      return this[_name$0][dartx.startsWith]('_');
     }
     get simpleName() {
       return this[_symbol];
     }
     _constructor(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = true;
       this.isStatic = false;
       this[_params] = null;
@@ -14178,7 +14369,7 @@
     }
     _instanceMethod(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = false;
       this.isStatic = false;
       this[_params] = null;
@@ -14188,7 +14379,7 @@
     }
     _staticMethod(cls, symbol, ftype) {
       this[_symbol] = symbol;
-      this[_name$] = _js_mirrors.getName(symbol);
+      this[_name$0] = _js_mirrors.getName(symbol);
       this.isConstructor = false;
       this.isStatic = true;
       this[_params] = null;
@@ -14238,7 +14429,7 @@
       this[_params] = ListOfParameterMirror().unmodifiable(params);
     }
     toString() {
-      return dart.str`MethodMirror on '${this[_name$]}'`;
+      return dart.str`MethodMirror on '${this[_name$0]}'`;
     }
     get qualifiedName() {
       return core.Symbol._check(this.noSuchMethod(new dart.InvocationImpl('qualifiedName', [], {isGetter: true})));
@@ -14298,7 +14489,7 @@
     }),
     fields: () => ({
       [_symbol]: core.Symbol,
-      [_name$]: core.String,
+      [_name$0]: core.String,
       [_params]: ListOfParameterMirror(),
       [_metadata$]: ListOfInstanceMirror(),
       isConstructor: core.bool,
@@ -15145,8 +15336,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Float32x4, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Float32x4), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float32x4])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeFloat32x4List, [
@@ -15778,8 +15968,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Int32x4, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Int32x4), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Int32x4])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeInt32x4List, [
@@ -15895,8 +16084,7 @@
     }),
     methods: () => ({
       _get: dart.definiteFunctionType(typed_data.Float64x2, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2]),
-      sublist: dart.definiteFunctionType(core.List$(typed_data.Float64x2), [core.int], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, typed_data.Float64x2])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeFloat64x2List, [
@@ -16261,8 +16449,7 @@
     getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
     methods: () => ({
       _get: dart.definiteFunctionType(core.double, [core.int]),
-      _set: dart.definiteFunctionType(dart.void, [core.int, core.num]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfdouble()], [core.int])
+      _set: dart.definiteFunctionType(dart.void, [core.int, core.num])
     })
   });
   dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfDouble, ['_get', '_set', 'setRange', 'length']);
@@ -16295,10 +16482,7 @@
   _native_typed_data.NativeTypedArrayOfInt[dart.implements] = () => [ListOfint()];
   dart.setSignature(_native_typed_data.NativeTypedArrayOfInt, {
     getters: () => ({length: dart.definiteFunctionType(core.int, [])}),
-    methods: () => ({
-      _set: dart.definiteFunctionType(dart.void, [core.int, core.int]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfint()], [core.int])
-    })
+    methods: () => ({_set: dart.definiteFunctionType(dart.void, [core.int, core.int])})
   });
   dart.defineExtensionMembers(_native_typed_data.NativeTypedArrayOfInt, ['_set', 'setRange', 'length']);
   dart.defineExtensionNames([
@@ -16342,7 +16526,6 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [ListOfdouble()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat32List, [dart.dynamic, dart.dynamic]),
@@ -16392,7 +16575,6 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [ListOfdouble()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({[dartx.sublist]: dart.definiteFunctionType(core.List$(core.double), [core.int], [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeFloat64List, [dart.dynamic, dart.dynamic]),
@@ -16447,10 +16629,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [_native_typed_data.NativeByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt16List, [dart.dynamic, dart.dynamic]),
@@ -16505,10 +16684,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt32List, [dart.dynamic, dart.dynamic]),
@@ -16563,10 +16739,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeInt8List, [dart.dynamic, dart.dynamic]),
@@ -16621,10 +16794,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint16List, [dart.dynamic, dart.dynamic]),
@@ -16679,10 +16849,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint32List, [dart.dynamic, dart.dynamic]),
@@ -16744,10 +16911,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8ClampedList, [dart.dynamic, dart.dynamic]),
@@ -16810,10 +16974,7 @@
       fromList: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [ListOfint()]),
       view: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [typed_data.ByteBuffer, core.int, core.int])
     }),
-    methods: () => ({
-      [dartx._get]: dart.definiteFunctionType(core.int, [core.int]),
-      [dartx.sublist]: dart.definiteFunctionType(core.List$(core.int), [core.int], [core.int])
-    }),
+    methods: () => ({[dartx._get]: dart.definiteFunctionType(core.int, [core.int])}),
     statics: () => ({
       _create1: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic]),
       _create2: dart.definiteFunctionType(_native_typed_data.NativeUint8List, [dart.dynamic, dart.dynamic]),
@@ -17627,10 +17788,7 @@
     dart.setSignature(_ControllerStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._ControllerStream$(T), [_StreamControllerLifecycleOfT()])}),
       fields: () => ({[_controller$]: _StreamControllerLifecycleOfT()}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        '==': dart.definiteFunctionType(core.bool, [core.Object])
-      })
+      methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])})
     });
     return _ControllerStream;
   });
@@ -17735,7 +17893,7 @@
       }
       onDone(handleDone) {
         if (handleDone == null) handleDone = async._nullDoneHandler;
-        this[_onDone] = this[_zone].registerCallback(dart.dynamic)(handleDone);
+        this[_onDone] = this[_zone].registerCallback(dart.void)(handleDone);
       }
       pause(resumeSignal) {
         if (resumeSignal === void 0) resumeSignal = null;
@@ -17888,7 +18046,7 @@
         dart.assert(!dart.test(this[_inCallback]));
         let wasInputPaused = this[_isInputPaused];
         this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-        this[_zone].runUnaryGuarded(dart.dynamic, T)(this[_onData], data);
+        this[_zone].runUnaryGuarded(dart.void, T)(this[_onData], data);
         this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
         this[_checkState](wasInputPaused);
       }
@@ -17929,7 +18087,7 @@
         const sendDone = (function() {
           if (!dart.test(this[_waitsForCancel])) return;
           this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_CANCELED | async._BufferingStreamSubscription._STATE_CLOSED | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
-          this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+          this[_zone].runGuarded(dart.void)(this[_onDone]);
           this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
         }).bind(this);
         dart.fn(sendDone, VoidTovoid$());
@@ -18622,10 +18780,7 @@
       constructors: () => ({new: dart.definiteFunctionType(async._AsBroadcastStreamController$(T), [VoidTovoid(), VoidTovoid()])}),
       fields: () => ({[_pending]: _StreamImplEventsOfT()}),
       getters: () => ({[_hasPending]: dart.definiteFunctionType(core.bool, [])}),
-      methods: () => ({
-        [_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent]),
-        add: dart.definiteFunctionType(dart.void, [T])
-      })
+      methods: () => ({[_addPendingEvent]: dart.definiteFunctionType(dart.void, [async._DelayedEvent])})
     });
     return _AsBroadcastStreamController;
   });
@@ -18644,7 +18799,7 @@
       onDone(handleDone) {}
       pause(resumeSignal) {
         if (resumeSignal === void 0) resumeSignal = null;
-        if (resumeSignal != null) resumeSignal.then(dart.dynamic)(dart.bind(this, _resume));
+        if (resumeSignal != null) resumeSignal.then(dart.void)(dart.bind(this, _resume));
         this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1;
       }
       resume() {
@@ -18719,6 +18874,20 @@
     constructors: () => ({new: dart.definiteFunctionType(async.DeferredLoadException, [core.String])}),
     fields: () => ({[_s]: core.String})
   });
+  async.FutureOr$ = dart.generic(T => {
+    class FutureOr extends core.Object {
+      _() {
+        dart.throw(new core.UnsupportedError("FutureOr can't be instantiated"));
+      }
+    }
+    dart.addTypeTests(FutureOr);
+    dart.defineNamedConstructor(FutureOr, '_');
+    dart.setSignature(FutureOr, {
+      constructors: () => ({_: dart.definiteFunctionType(async.FutureOr$(T), [])})
+    });
+    return FutureOr;
+  });
+  async.FutureOr = FutureOr();
   const _completeWithValue = Symbol('_completeWithValue');
   let const$8;
   async.Future$ = dart.flattenFutures(dart.generic(T => {
@@ -18782,7 +18951,7 @@
         let result = new (_FutureOfT())();
         async.Timer.new(duration, dart.fn(() => {
           try {
-            result[_complete](computation == null ? null : computation());
+            result[_complete](dart.nullSafe(computation, _ => _()));
           } catch (e) {
             let s = dart.stackTrace(e);
             async._completeWithErrorCallback(result, e, s);
@@ -18824,31 +18993,43 @@
             }
           }
           dart.fn(handleError, dynamicAnddynamicTovoid$());
-          for (let future of futures) {
-            let pos = remaining++;
-            future.then(dart.dynamic)(dart.fn(value => {
-              remaining--;
-              if (values != null) {
-                values[dartx._set](pos, value);
-                if (remaining == 0) {
-                  result[_completeWithValue](values);
+          try {
+            for (let future of futures) {
+              let pos = remaining;
+              future.then(dart.dynamic)(dart.fn(value => {
+                remaining--;
+                if (values != null) {
+                  values[dartx._set](pos, value);
+                  if (remaining == 0) {
+                    result[_completeWithValue](values);
+                  }
+                } else {
+                  if (cleanUp != null && value != null) {
+                    async.Future.sync(dart.fn(() => {
+                      cleanUp(value);
+                    }, VoidTodynamic$()));
+                  }
+                  if (remaining == 0 && !dart.test(eagerError)) {
+                    result[_completeError](error, stackTrace);
+                  }
                 }
-              } else {
-                if (cleanUp != null && value != null) {
-                  async.Future.sync(dart.fn(() => {
-                    cleanUp(value);
-                  }, VoidTodynamic$()));
-                }
-                if (remaining == 0 && !dart.test(eagerError)) {
-                  result[_completeError](error, stackTrace);
-                }
-              }
-            }, dart.definiteFunctionType(dart.dynamic, [T])), {onError: handleError});
+              }, dart.definiteFunctionType(async.FutureOr, [T])), {onError: handleError});
+              remaining++;
+            }
+            if (remaining == 0) {
+              return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
+            }
+            values = core.List$(T).new(remaining);
+          } catch (e) {
+            let st = dart.stackTrace(e);
+            if (remaining == 0 || dart.test(eagerError)) {
+              return async.Future$(core.List$(T)).error(e, st);
+            } else {
+              error = e;
+              stackTrace = st;
+            }
           }
-          if (remaining == 0) {
-            return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
-          }
-          values = core.List$(T).new(remaining);
+
           return result;
         };
       }
@@ -18879,7 +19060,7 @@
         let nextIteration = null;
         nextIteration = async.Zone.current.bindUnaryCallback(dart.dynamic, core.bool)(dart.fn(keepGoing => {
           if (dart.test(keepGoing)) {
-            async.Future.sync(f).then(dart.dynamic)(dynamicTodynamic()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
+            async.Future.sync(f).then(dart.dynamic)(dynamicToFutureOr()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
           } else {
             doneSignal[_complete](null);
           }
@@ -19220,6 +19401,7 @@
   const _setChained = Symbol('_setChained');
   const _thenNoZoneRegistration = Symbol('_thenNoZoneRegistration');
   const _setPendingComplete = Symbol('_setPendingComplete');
+  const _clearPendingComplete = Symbol('_clearPendingComplete');
   const _error = Symbol('_error');
   const _chainSource = Symbol('_chainSource');
   const _setValue = Symbol('_setValue');
@@ -19235,7 +19417,7 @@
     let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
     let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))();
     let TTodynamic = () => (TTodynamic = dart.constFn(dart.functionType(dart.dynamic, [T])))();
-    let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
+    let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
     class _Future extends core.Object {
       new() {
         this[_zone] = async.Zone.current;
@@ -19284,7 +19466,7 @@
           let currentZone = async.Zone.current;
           let registered = null;
           if (!core.identical(currentZone, async._ROOT_ZONE)) {
-            f = currentZone.registerUnaryCallback(dart.dynamic, T)(f);
+            f = currentZone.registerUnaryCallback(async.FutureOr$(E), T)(f);
             if (onError != null) {
               onError = async._registerErrorHandler(T)(onError, currentZone);
             }
@@ -19324,6 +19506,10 @@
         dart.assert(this[_mayComplete]);
         this[_state] = async._Future._PENDING_COMPLETE;
       }
+      [_clearPendingComplete]() {
+        dart.assert(this[_isPendingComplete]);
+        this[_state] = async._Future._INCOMPLETE;
+      }
       get [_error]() {
         dart.assert(this[_hasError]);
         return async.AsyncError._check(this[_resultOrListeners]);
@@ -19424,8 +19610,9 @@
         try {
           source.then(dart.dynamic)(dart.fn(value => {
             dart.assert(target[_isPendingComplete]);
-            target[_completeWithValue](value);
-          }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+            target[_clearPendingComplete]();
+            target[_complete](value);
+          }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
               if (stackTrace === void 0) stackTrace = null;
               dart.assert(target[_isPendingComplete]);
               target[_completeError](error, core.StackTrace._check(stackTrace));
@@ -19675,7 +19862,7 @@
             timer.cancel();
             result[_completeWithValue](v);
           }
-        }, TTodynamic$()), {onError: dart.fn((e, s) => {
+        }, TToFutureOr()), {onError: dart.fn((e, s) => {
             if (dart.test(timer.isActive)) {
               timer.cancel();
               result[_completeError](e, core.StackTrace._check(s));
@@ -19711,12 +19898,13 @@
       }),
       methods: () => ({
         [_setChained]: dart.definiteFunctionType(dart.void, [async._Future]),
-        then: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic()], {onError: core.Function}]),
+        then: dart.definiteFunctionType(E => [async.Future$(E), [dart.functionType(async.FutureOr$(E), [T])], {onError: core.Function}]),
         [_thenNoZoneRegistration]: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic(), core.Function]]),
         catchError: dart.definiteFunctionType(async.Future$(T), [core.Function], {test: dynamicTobool()}),
         whenComplete: dart.definiteFunctionType(async.Future$(T), [VoidTodynamic()]),
         asStream: dart.definiteFunctionType(async.Stream$(T), []),
         [_setPendingComplete]: dart.definiteFunctionType(dart.void, []),
+        [_clearPendingComplete]: dart.definiteFunctionType(dart.void, []),
         [_setValue]: dart.definiteFunctionType(dart.void, [T]),
         [_setErrorObject]: dart.definiteFunctionType(dart.void, [async.AsyncError]),
         [_setError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace]),
@@ -19837,10 +20025,10 @@
     }
     let implementation = currentZone[_scheduleMicrotask];
     if (core.identical(async._ROOT_ZONE, implementation.zone) && dart.test(async._ROOT_ZONE.inSameErrorZone(currentZone))) {
-      async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.dynamic)(callback));
+      async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.void)(callback));
       return;
     }
-    async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+    async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
   };
   dart.fn(async.scheduleMicrotask, _AsyncCallbackTovoid());
   async._AsyncRun = class _AsyncRun extends core.Object {
@@ -19960,10 +20148,7 @@
     dart.setSignature(StreamView, {
       constructors: () => ({new: dart.definiteFunctionType(async.StreamView$(T), [StreamOfT()])}),
       fields: () => ({[_stream]: StreamOfT()}),
-      methods: () => ({
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-        listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-      })
+      methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
     });
     return StreamView;
   });
@@ -20668,8 +20853,7 @@
       fields: () => ({
         [_pending]: _EventGeneratorOfT(),
         [_isUsed]: core.bool
-      }),
-      methods: () => ({[_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool])})
+      })
     });
     return _GeneratedStreamImpl;
   });
@@ -21017,7 +21201,7 @@
         this[_state] = (dart.notNull(this[_state]) & ~async._DoneStreamSubscription._SCHEDULED) >>> 0;
         if (dart.test(this.isPaused)) return;
         this[_state] = (dart.notNull(this[_state]) | async._DoneStreamSubscription._DONE_SENT) >>> 0;
-        if (this[_onDone] != null) this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+        if (this[_onDone] != null) this[_zone].runGuarded(dart.void)(this[_onDone]);
       }
     }
     dart.addTypeTests(_DoneStreamSubscription);
@@ -21102,7 +21286,7 @@
       [_onCancel]() {
         let shutdown = this[_controller$] == null || dart.test(this[_controller$].isClosed);
         if (this[_onCancelHandler] != null) {
-          this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+          this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
         }
         if (shutdown) {
           if (this[_subscription] != null) {
@@ -21113,7 +21297,7 @@
       }
       [_onListen]() {
         if (this[_onListenHandler] != null) {
-          this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+          this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
         }
       }
       [_cancelSubscription]() {
@@ -21548,7 +21732,6 @@
         [_subscription]: StreamSubscriptionOfS()
       }),
       methods: () => ({
-        [_add$]: dart.definiteFunctionType(dart.void, [T]),
         [_handleData]: dart.definiteFunctionType(dart.void, [S]),
         [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace]),
         [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -21600,8 +21783,7 @@
     }
     dart.setSignature(_WhereStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._WhereStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _WhereStream;
   });
@@ -21638,8 +21820,7 @@
     }
     dart.setSignature(_MapStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._MapStream$(S, T), [StreamOfS(), _TransformationOfS$T()])}),
-      fields: () => ({[_transform]: _TransformationOfS$T()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+      fields: () => ({[_transform]: _TransformationOfS$T()})
     });
     return _MapStream;
   });
@@ -21671,8 +21852,7 @@
     }
     dart.setSignature(_ExpandStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._ExpandStream$(S, T), [StreamOfS(), _TransformationOfS$IterableOfT()])}),
-      fields: () => ({[_expand]: _TransformationOfS$IterableOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [S, _EventSinkOfT()])})
+      fields: () => ({[_expand]: _TransformationOfS$IterableOfT()})
     });
     return _ExpandStream;
   });
@@ -21761,11 +21941,7 @@
     }
     dart.setSignature(_TakeStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._TakeStream$(T), [StreamOfT(), core.int])}),
-      fields: () => ({[_count]: core.int}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_count]: core.int})
     });
     return _TakeStream;
   });
@@ -21839,8 +22015,7 @@
     }
     dart.setSignature(_TakeWhileStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._TakeWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])})
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _TakeWhileStream;
   });
@@ -21873,11 +22048,7 @@
     }
     dart.setSignature(_SkipStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._SkipStream$(T), [StreamOfT(), core.int])}),
-      fields: () => ({[_count]: core.int}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_count]: core.int})
     });
     return _SkipStream;
   });
@@ -21923,11 +22094,7 @@
     }
     dart.setSignature(_SkipWhileStream, {
       constructors: () => ({new: dart.definiteFunctionType(async._SkipWhileStream$(T), [StreamOfT(), _PredicateOfT()])}),
-      fields: () => ({[_test]: _PredicateOfT()}),
-      methods: () => ({
-        [_createSubscription]: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid(), core.Function, VoidTovoid(), core.bool]),
-        [_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])
-      })
+      fields: () => ({[_test]: _PredicateOfT()})
     });
     return _SkipWhileStream;
   });
@@ -21981,7 +22148,6 @@
         [_equals]: _EqualityOfT(),
         [_previous$]: core.Object
       }),
-      methods: () => ({[_handleData]: dart.definiteFunctionType(dart.void, [T, _EventSinkOfT()])}),
       sfields: () => ({_SENTINEL: core.Object})
     });
     return _DistinctStream;
@@ -22122,7 +22288,6 @@
       }),
       getters: () => ({[_isSubscribed]: dart.definiteFunctionType(core.bool, [])}),
       methods: () => ({
-        [_add$]: dart.definiteFunctionType(dart.void, [T]),
         [_handleData]: dart.definiteFunctionType(dart.void, [S]),
         [_handleError]: dart.definiteFunctionType(dart.void, [dart.dynamic], [dart.dynamic]),
         [_handleDone]: dart.definiteFunctionType(dart.void, [])
@@ -22290,7 +22455,6 @@
     }
     dart.setSignature(_StreamHandlerTransformer, {
       constructors: () => ({new: dart.definiteFunctionType(async._StreamHandlerTransformer$(S, T), [], {handleData: SAndEventSinkOfTTovoid(), handleError: ObjectAndStackTraceAndEventSinkOfTTovoid(), handleDone: EventSinkOfTTovoid()})}),
-      methods: () => ({bind: dart.definiteFunctionType(async.Stream$(T), [StreamOfS()])}),
       statics: () => ({
         _defaultHandleData: dart.definiteFunctionType(dart.void, [dart.dynamic, async.EventSink]),
         _defaultHandleError: dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace, async.EventSink]),
@@ -22369,7 +22533,7 @@
       if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
         return async.Zone.current.createTimer(duration, callback);
       }
-      return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+      return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
     }
     static periodic(duration, callback) {
       if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
@@ -23108,7 +23272,7 @@
   dart.fn(async._rootScheduleMicrotask, ZoneAndZoneDelegateAndZone__Tovoid());
   async._rootCreateTimer = function(self, parent, zone, duration, callback) {
     if (!core.identical(async._ROOT_ZONE, zone)) {
-      callback = zone.bindCallback(dart.dynamic)(callback);
+      callback = zone.bindCallback(dart.void)(callback);
     }
     return async.Timer._createTimer(duration, callback);
   };
@@ -23871,11 +24035,6 @@
         [_equals$]: _EqualityOfK(),
         [_hashCode]: _HasherOfK(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        remove: dart.definiteFunctionType(V, [core.Object])
       })
     });
     dart.defineExtensionMembers(_CustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -23918,8 +24077,7 @@
     dart.setSignature(_HashMapKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._HashMapKeyIterable$(E), [_HashMapOfE$dynamic()])}),
       fields: () => ({[_map$0]: _HashMapOfE$dynamic()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(_HashMapKeyIterable, [
       'contains',
@@ -24116,19 +24274,7 @@
         [_map$0]: dart.dynamic,
         [_modifications$]: core.int
       }),
-      getters: () => ({
-        keys: dart.definiteFunctionType(core.Iterable$(K), []),
-        values: dart.definiteFunctionType(core.Iterable$(V), [])
-      }),
-      methods: () => ({
-        addAll: dart.definiteFunctionType(dart.void, [MapOfK$V()]),
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        putIfAbsent: dart.definiteFunctionType(V, [K, VoidToV()]),
-        remove: dart.definiteFunctionType(V, [core.Object]),
-        forEach: dart.definiteFunctionType(dart.void, [KAndVTovoid()]),
-        [_modified$]: dart.definiteFunctionType(dart.void, [])
-      })
+      methods: () => ({[_modified$]: dart.definiteFunctionType(dart.void, [])})
     });
     dart.defineExtensionMembers(_Es6LinkedIdentityHashMap, [
       'containsKey',
@@ -24198,8 +24344,7 @@
         [_map$0]: dart.dynamic,
         [_isKeys]: core.bool
       }),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({forEach: dart.definiteFunctionType(dart.void, [ETovoid()])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
     });
     dart.defineExtensionMembers(_Es6MapIterable, [
       'contains',
@@ -24318,11 +24463,6 @@
         [_equals$]: _EqualityOfK(),
         [_hashCode]: _HasherOfK(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        _get: dart.definiteFunctionType(V, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [K, V]),
-        remove: dart.definiteFunctionType(V, [core.Object])
       })
     });
     dart.defineExtensionMembers(_LinkedCustomHashMap, ['_get', '_set', 'containsKey', 'remove']);
@@ -24694,11 +24834,7 @@
       }
     }
     dart.setSignature(_HashSetBase, {
-      methods: () => ({
-        difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
-      })
+      methods: () => ({toSet: dart.definiteFunctionType(core.Set$(E), [])})
     });
     dart.defineExtensionMembers(_HashSetBase, ['toSet']);
     return _HashSetBase;
@@ -24948,7 +25084,6 @@
         [_lookup]: dart.definiteFunctionType(E, [core.Object]),
         add: dart.definiteFunctionType(core.bool, [E]),
         [_add$0]: dart.definiteFunctionType(core.bool, [E]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
         [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
         [_computeElements]: dart.definiteFunctionType(core.List$(E), []),
@@ -24999,9 +25134,6 @@
         return -1;
       }
     }
-    dart.setSignature(_IdentityHashSet, {
-      methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-    });
     return _IdentityHashSet;
   });
   collection._IdentityHashSet = _IdentityHashSet();
@@ -25055,11 +25187,6 @@
         [_equality]: _EqualityOfE(),
         [_hasher]: _HasherOfE(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-        add: dart.definiteFunctionType(core.bool, [E]),
-        lookup: dart.definiteFunctionType(E, [core.Object])
       })
     });
     dart.defineExtensionMembers(_CustomHashSet, ['contains']);
@@ -25391,9 +25518,7 @@
       }),
       getters: () => ({
         iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        length: dart.definiteFunctionType(core.int, []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, [])
+        length: dart.definiteFunctionType(core.int, [])
       }),
       methods: () => ({
         [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
@@ -25402,13 +25527,10 @@
         [_contains]: dart.definiteFunctionType(core.bool, [core.Object]),
         lookup: dart.definiteFunctionType(E, [core.Object]),
         [_lookup]: dart.definiteFunctionType(E, [core.Object]),
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
         add: dart.definiteFunctionType(core.bool, [E]),
         [_add$0]: dart.definiteFunctionType(core.bool, [E]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
         [_remove]: dart.definiteFunctionType(core.bool, [core.Object]),
-        removeWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
-        retainWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
         [_filterWhere]: dart.definiteFunctionType(dart.void, [ETobool(), core.bool]),
         [_addHashTableEntry$]: dart.definiteFunctionType(core.bool, [dart.dynamic, E]),
         [_removeHashTableEntry$]: dart.definiteFunctionType(core.bool, [dart.dynamic, core.Object]),
@@ -25464,9 +25586,6 @@
         return -1;
       }
     }
-    dart.setSignature(_LinkedIdentityHashSet, {
-      methods: () => ({[_newSet]: dart.definiteFunctionType(core.Set$(E), [])})
-    });
     return _LinkedIdentityHashSet;
   });
   collection._LinkedIdentityHashSet = _LinkedIdentityHashSet();
@@ -25532,11 +25651,6 @@
         [_equality]: _EqualityOfE(),
         [_hasher]: _HasherOfE(),
         [_validKey]: _PredicateOfObject()
-      }),
-      methods: () => ({
-        [_newSet]: dart.definiteFunctionType(core.Set$(E), []),
-        add: dart.definiteFunctionType(core.bool, [E]),
-        lookup: dart.definiteFunctionType(E, [core.Object])
       })
     });
     dart.defineExtensionMembers(_LinkedCustomHashSet, ['contains']);
@@ -26482,19 +26596,13 @@
         [_length$1]: core.int,
         [_first$]: E
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
         addFirst: dart.definiteFunctionType(dart.void, [E]),
         add: dart.definiteFunctionType(dart.void, [E]),
         addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [E]),
         clear: dart.definiteFunctionType(dart.void, []),
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
         [_insertBefore$]: dart.definiteFunctionType(dart.void, [E, E], {updateFirst: core.bool}),
         [_unlink$]: dart.definiteFunctionType(dart.void, [E])
       })
@@ -26786,12 +26894,7 @@
     dart.setSignature(_MapBaseValueIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._MapBaseValueIterable$(K, V), [MapOfK$V()])}),
       fields: () => ({[_map$0]: MapOfK$V()}),
-      getters: () => ({
-        first: dart.definiteFunctionType(V, []),
-        single: dart.definiteFunctionType(V, []),
-        last: dart.definiteFunctionType(V, []),
-        iterator: dart.definiteFunctionType(core.Iterator$(V), [])
-      })
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(V), [])})
     });
     dart.defineExtensionMembers(_MapBaseValueIterable, [
       'length',
@@ -27464,12 +27567,7 @@
         [_sentinel]: _DoubleLinkedQueueSentinelOfE(),
         [_elementCount]: core.int
       }),
-      getters: () => ({
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, []),
-        iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(collection._DoubleLinkedQueueIterator$(E), [])}),
       methods: () => ({
         addLast: dart.definiteFunctionType(dart.void, [E]),
         addFirst: dart.definiteFunctionType(dart.void, [E]),
@@ -27841,16 +27939,8 @@
         [_tail]: core.int,
         [_modificationCount]: core.int
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
-        forEach: dart.definiteFunctionType(dart.void, [ETovoid()]),
-        elementAt: dart.definiteFunctionType(E, [core.int]),
-        toList: dart.definiteFunctionType(core.List$(E), [], {growable: core.bool}),
         add: dart.definiteFunctionType(dart.void, [E]),
         addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
@@ -28551,8 +28641,7 @@
     dart.setSignature(_SplayTreeKeyIterable, {
       constructors: () => ({new: dart.definiteFunctionType(collection._SplayTreeKeyIterable$(K), [_SplayTreeOfK$_SplayTreeNodeOfK()])}),
       fields: () => ({[_tree]: _SplayTreeOfK$_SplayTreeNodeOfK()}),
-      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])}),
-      methods: () => ({toSet: dart.definiteFunctionType(core.Set$(K), [])})
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(K), [])})
     });
     dart.defineExtensionMembers(_SplayTreeKeyIterable, ['toSet', 'length', 'isEmpty', 'iterator']);
     return _SplayTreeKeyIterable;
@@ -28822,24 +28911,14 @@
         [_comparator]: ComparatorOfE(),
         [_validKey]: collection._Predicate
       }),
-      getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, [])
-      }),
+      getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
       methods: () => ({
         [_compare]: dart.definiteFunctionType(core.int, [E, E]),
         add: dart.definiteFunctionType(core.bool, [E]),
         remove: dart.definiteFunctionType(core.bool, [core.Object]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
         lookup: dart.definiteFunctionType(E, [core.Object]),
-        intersection: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        difference: dart.definiteFunctionType(core.Set$(E), [SetOfObject()]),
-        union: dart.definiteFunctionType(core.Set$(E), [SetOfE()]),
         [_clone]: dart.definiteFunctionType(collection.SplayTreeSet$(E), []),
-        [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()]),
-        toSet: dart.definiteFunctionType(core.Set$(E), [])
+        [_copyNode]: dart.definiteFunctionType(collection._SplayTreeNode$(E), [_SplayTreeNodeOfE()])
       })
     });
     dart.defineExtensionMembers(SplayTreeSet, [
@@ -28906,7 +28985,7 @@
   const _data = Symbol('_data');
   const _isUpgraded = Symbol('_isUpgraded');
   const _upgradedMap = Symbol('_upgradedMap');
-  const _process = Symbol('_process');
+  const _process$ = Symbol('_process');
   const _upgrade = Symbol('_upgrade');
   convert._JsonMap = class _JsonMap extends core.Object {
     new(original) {
@@ -28921,7 +29000,7 @@
         return null;
       } else {
         let result = convert._JsonMap._getProperty(this[_processed], core.String._check(key));
-        if (dart.test(convert._JsonMap._isUnprocessed(result))) result = this[_process](core.String._check(key));
+        if (dart.test(convert._JsonMap._isUnprocessed(result))) result = this[_process$](core.String._check(key));
         return result;
       }
     }
@@ -29049,7 +29128,7 @@
       dart.assert(this[_isUpgraded]);
       return result;
     }
-    [_process](key) {
+    [_process$](key) {
       if (!dart.test(convert._JsonMap._hasProperty(this[_original], key))) return null;
       let result = convert._convertJsonToDartLazy(convert._JsonMap._getProperty(this[_original], key));
       return convert._JsonMap._setProperty(this[_processed], key, result);
@@ -29102,7 +29181,7 @@
       forEach: dart.definiteFunctionType(dart.void, [dynamicAnddynamicTovoid()]),
       [_computeKeys$]: dart.definiteFunctionType(core.List$(core.String), []),
       [_upgrade]: dart.definiteFunctionType(core.Map, []),
-      [_process]: dart.definiteFunctionType(dart.dynamic, [core.String])
+      [_process$]: dart.definiteFunctionType(dart.dynamic, [core.String])
     }),
     statics: () => ({
       _hasProperty: dart.definiteFunctionType(core.bool, [dart.dynamic, core.String]),
@@ -29153,7 +29232,6 @@
   dart.setSignature(convert._JsonMapKeyIterable, {
     constructors: () => ({new: dart.definiteFunctionType(convert._JsonMapKeyIterable, [convert._JsonMap])}),
     fields: () => ({[_parent]: convert._JsonMap}),
-    getters: () => ({iterator: dart.definiteFunctionType(core.Iterator, [])}),
     methods: () => ({elementAt: dart.definiteFunctionType(core.String, [core.int])})
   });
   dart.defineExtensionMembers(convert._JsonMapKeyIterable, ['elementAt', 'contains', 'length', 'iterator']);
@@ -29578,8 +29656,7 @@
     fields: () => ({[_subsetMask]: core.int}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
     })
   });
   convert.AsciiEncoder = class AsciiEncoder extends convert._UnicodeSubsetEncoder {
@@ -29669,8 +29746,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-      [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()])
+      [_convertInvalid]: dart.definiteFunctionType(core.String, [ListOfint(), core.int, core.int])
     })
   });
   convert.AsciiDecoder = class AsciiDecoder extends convert._UnicodeSubsetDecoder {
@@ -29693,8 +29769,7 @@
     }
   };
   dart.setSignature(convert.AsciiDecoder, {
-    constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})}),
-    methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+    constructors: () => ({new: dart.definiteFunctionType(convert.AsciiDecoder, [], {allowInvalid: core.bool})})
   });
   const _utf8Sink = Symbol('_utf8Sink');
   let const$30;
@@ -30709,8 +30784,7 @@
       fields: () => ({[_codec]: CodecOfS$T()}),
       getters: () => ({
         encoder: dart.definiteFunctionType(convert.Converter$(T, S), []),
-        decoder: dart.definiteFunctionType(convert.Converter$(S, T), []),
-        inverted: dart.definiteFunctionType(convert.Codec$(S, T), [])
+        decoder: dart.definiteFunctionType(convert.Converter$(S, T), [])
       })
     });
     return _InvertedCodec;
@@ -30741,15 +30815,12 @@
         [_first$0]: ConverterOfS$M(),
         [_second]: ConverterOfM$T()
       }),
-      methods: () => ({
-        convert: dart.definiteFunctionType(T, [S]),
-        startChunkedConversion: dart.definiteFunctionType(core.Sink$(S), [SinkOfT()])
-      })
+      methods: () => ({convert: dart.definiteFunctionType(T, [S])})
     });
     return _FusedConverter;
   });
   convert._FusedConverter = _FusedConverter();
-  const _name$0 = Symbol('_name');
+  const _name$1 = Symbol('_name');
   let const$34;
   let const$35;
   let const$36;
@@ -30760,7 +30831,7 @@
   let const$41;
   convert.HtmlEscapeMode = class HtmlEscapeMode extends core.Object {
     _(name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) {
-      this[_name$0] = name;
+      this[_name$1] = name;
       this.escapeLtGt = escapeLtGt;
       this.escapeQuot = escapeQuot;
       this.escapeApos = escapeApos;
@@ -30776,10 +30847,10 @@
       this.escapeQuot = escapeQuot;
       this.escapeApos = escapeApos;
       this.escapeSlash = escapeSlash;
-      this[_name$0] = name;
+      this[_name$1] = name;
     }
     toString() {
-      return this[_name$0];
+      return this[_name$1];
     }
   };
   dart.defineNamedConstructor(convert.HtmlEscapeMode, '_');
@@ -30789,7 +30860,7 @@
       new: dart.definiteFunctionType(convert.HtmlEscapeMode, [], {name: core.String, escapeLtGt: core.bool, escapeQuot: core.bool, escapeApos: core.bool, escapeSlash: core.bool})
     }),
     fields: () => ({
-      [_name$0]: core.String,
+      [_name$1]: core.String,
       escapeLtGt: core.bool,
       escapeQuot: core.bool,
       escapeApos: core.bool,
@@ -31063,9 +31134,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [core.Object]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfObject()]),
-      fuse: dart.definiteFunctionType(T => [convert.Converter$(core.Object, T), [convert.Converter$(core.String, T)]])
+      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfString()])
     })
   });
   const _indent = Symbol('_indent');
@@ -31139,8 +31208,7 @@
     }),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.Object]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfObject()])
+      startChunkedConversion: dart.definiteFunctionType(convert.ChunkedConversionSink$(core.Object), [SinkOfListOfint()])
     }),
     sfields: () => ({DEFAULT_BUFFER_SIZE: core.int}),
     statics: () => ({_utf8Encode: dart.definiteFunctionType(core.List$(core.int), [core.String])}),
@@ -31247,8 +31315,7 @@
     fields: () => ({[_reviver]: convert._Reviver}),
     methods: () => ({
       convert: dart.definiteFunctionType(dart.dynamic, [core.String]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.Object), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfObject()])
     })
   });
   convert._parseJson = function(source, reviver) {
@@ -31845,8 +31912,7 @@
     }
   };
   dart.setSignature(convert.Latin1Decoder, {
-    constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})}),
-    methods: () => ({startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])})
+    constructors: () => ({new: dart.definiteFunctionType(convert.Latin1Decoder, [], {allowInvalid: core.bool})})
   });
   const _addSliceToSink = Symbol('_addSliceToSink');
   convert._Latin1DecoderSink = class _Latin1DecoderSink extends convert.ByteConversionSinkBase {
@@ -32434,8 +32500,7 @@
     constructors: () => ({new: dart.definiteFunctionType(convert.Utf8Encoder, [])}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [StreamOfString()])
+      startChunkedConversion: dart.definiteFunctionType(convert.StringConversionSink, [SinkOfListOfint()])
     })
   });
   convert._Utf8Encoder = class _Utf8Encoder extends core.Object {
@@ -32680,9 +32745,7 @@
     fields: () => ({[_allowMalformed]: core.bool}),
     methods: () => ({
       convert: dart.definiteFunctionType(core.String, [ListOfint()], [core.int, core.int]),
-      startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()]),
-      bind: dart.definiteFunctionType(async.Stream$(core.String), [StreamOfListOfint()]),
-      fuse: dart.definiteFunctionType(T => [convert.Converter$(core.List$(core.int), T), [convert.Converter$(core.String, T)]])
+      startChunkedConversion: dart.definiteFunctionType(convert.ByteConversionSink, [SinkOfString()])
     }),
     statics: () => ({_convertIntercepted: dart.definiteFunctionType(core.String, [core.bool, ListOfint(), core.int, core.int])}),
     names: ['_convertIntercepted']
@@ -34199,10 +34262,6 @@
         [_generator$]: _GeneratorOfE()
       }),
       getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
-      methods: () => ({
-        skip: dart.definiteFunctionType(core.Iterable$(E), [core.int]),
-        take: dart.definiteFunctionType(core.Iterable$(E), [core.int])
-      }),
       statics: () => ({_id: dart.definiteFunctionType(core.int, [core.int])}),
       names: ['_id']
     });
@@ -34529,10 +34588,7 @@
   dart.setSignature(core.Runes, {
     constructors: () => ({new: dart.definiteFunctionType(core.Runes, [core.String])}),
     fields: () => ({string: core.String}),
-    getters: () => ({
-      iterator: dart.definiteFunctionType(core.RuneIterator, []),
-      last: dart.definiteFunctionType(core.int, [])
-    })
+    getters: () => ({iterator: dart.definiteFunctionType(core.RuneIterator, [])})
   });
   dart.defineExtensionMembers(core.Runes, ['iterator', 'last']);
   core._isLeadSurrogate = function(code) {
@@ -38563,8 +38619,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot resolve symbolic links", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfString()._check(response);
+      }, dynamicToFutureOrOfString()));
     }
     resolveSymbolicLinksSync() {
       let result = io.FileSystemEntity._resolveSymbolicLinks(this.path);
@@ -38589,8 +38645,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, dart.str`Error in FileSystemEntity.identical(${path1}, ${path2})`, ""));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfbool()._check(response);
+      }, dynamicToFutureOrOfbool()));
     }
     get isAbsolute() {
       if (dart.test(io.Platform.isWindows)) {
@@ -38685,8 +38741,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Error getting type", path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     static _throwIfError(result, msg, path) {
       if (path === void 0) path = null;
@@ -38881,7 +38937,7 @@
           } else {
             return this.create();
           }
-        }, boolTodynamic()));
+        }, boolToFutureOrOfDirectory()));
       } else {
         return io._IOService._dispatch(io._DIRECTORY_CREATE, JSArrayOfString().of([this.path])).then(io._Directory)(dart.fn(response => {
           if (dart.test(this[_isErrorResponse](response))) {
@@ -39102,7 +39158,7 @@
           this.error(response);
           this.close();
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
     }
     onResume() {
       if (!dart.test(this.nextRunning)) {
@@ -39167,7 +39223,7 @@
         } else {
           this.controller.addError(new io.FileSystemException("Internal error"));
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOr$()));
     }
     [_cleanup]() {
       this.controller.close();
@@ -39309,6 +39365,9 @@
       }[this.index];
     }
   };
+  dart.setSignature(io.FileLock, {
+    fields: () => ({index: core.int})
+  });
   dart.defineEnumValues(io.FileLock, [
     'SHARED',
     'EXCLUSIVE'
@@ -39474,7 +39533,7 @@
         if (dart.test(this[_atEnd])) {
           this[_closeFile]();
         }
-      }, ListOfintTodynamic())).catchError(dart.fn((e, s) => {
+      }, ListOfintToFutureOr())).catchError(dart.fn((e, s) => {
         if (!dart.test(this[_unsubscribed])) {
           this[_controller$0].addError(e, core.StackTrace._check(s));
           this[_closeFile]();
@@ -39497,7 +39556,7 @@
       dart.fn(onReady, RandomAccessFileTovoid());
       const onOpenFile = (function(file) {
         if (dart.notNull(this[_position$0]) > 0) {
-          file.setPosition(this[_position$0]).then(dart.dynamic)(onReady, {onError: dart.fn((e, s) => {
+          file.setPosition(this[_position$0]).then(dart.void)(onReady, {onError: dart.fn((e, s) => {
               this[_controller$0].addError(e, core.StackTrace._check(s));
               this[_readInProgress] = false;
               this[_closeFile]();
@@ -39514,7 +39573,7 @@
       }).bind(this);
       dart.fn(openFailed, dynamicAnddynamicTovoid$());
       if (this[_path$] != null) {
-        io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.dynamic)(onOpenFile, {onError: openFailed});
+        io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.void)(onOpenFile, {onError: openFailed});
       } else {
         try {
           onOpenFile(io._File._openStdioSync(0));
@@ -39581,7 +39640,7 @@
         _subscription = stream.listen(dart.fn(d => {
           dart.dsend(_subscription, 'pause');
           try {
-            openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileTodynamic()), {onError: error});
+            openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileToFutureOr()), {onError: error});
           } catch (e) {
             let stackTrace = dart.stackTrace(e);
             error(e, stackTrace);
@@ -39590,7 +39649,7 @@
         }, ListOfintTovoid$()), {onDone: dart.fn(() => {
             completer.complete(this[_file]);
           }, VoidTovoid$()), onError: error, cancelOnError: true});
-      }, RandomAccessFileTodynamic())).catchError(dart.bind(completer, 'completeError'));
+      }, RandomAccessFileToFutureOr())).catchError(dart.bind(completer, 'completeError'));
       return completer.future;
     }
     close() {
@@ -39628,8 +39687,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot check existence", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfbool()._check(response);
+      }, dynamicToFutureOrOfbool()));
     }
     static _exists(path) {
       dart.throw(new core.UnsupportedError("File._exists"));
@@ -39753,8 +39812,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "Cannot retrieve length of file", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     static _lengthFromPath(path) {
       dart.throw(new core.UnsupportedError("File._lengthFromPath"));
@@ -39892,7 +39951,7 @@
       return this.open({mode: mode}).then(io.File)(dart.fn(file => file.writeFrom(bytes, 0, bytes[dartx.length]).then(dart.dynamic)(dart.fn(_ => {
         if (dart.test(flush)) return file.flush().then(io._File)(dart.fn(_ => this, RandomAccessFileTo_File()));
         return this;
-      }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileTodynamic()));
+      }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileToFutureOrOfFile()));
     }
     writeAsBytesSync(bytes, opts) {
       let mode = opts && 'mode' in opts ? opts.mode : io.FileMode.WRITE;
@@ -40053,8 +40112,8 @@
           dart.throw(io._exceptionFromResponse(response, "readByte failed", this.path));
         }
         this[_resourceInfo].addRead(1);
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     readByteSync() {
       this[_checkAvailable]();
@@ -40074,8 +40133,8 @@
           dart.throw(io._exceptionFromResponse(response, "read failed", this.path));
         }
         this[_resourceInfo].addRead(core.int._check(dart.dload(dart.dindex(response, 1), 'length')));
-        return dart.dindex(response, 1);
-      }, dynamicTodynamic$()));
+        return FutureOrOfListOfint()._check(dart.dindex(response, 1));
+      }, dynamicToFutureOrOfListOfint()));
     }
     readSync(bytes) {
       this[_checkAvailable]();
@@ -40108,8 +40167,8 @@
         let data = dart.dindex(response, 2);
         buffer[dartx.setRange](start, dart.asInt(dart.notNull(start) + dart.notNull(core.num._check(read))), IterableOfint()._check(data));
         this[_resourceInfo].addRead(core.int._check(read));
-        return read;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(read);
+      }, dynamicToFutureOrOfint()));
     }
     readIntoSync(buffer, start, end) {
       if (start === void 0) start = 0;
@@ -40222,8 +40281,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "position failed", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     positionSync() {
       this[_checkAvailable]();
@@ -40268,8 +40327,8 @@
         if (dart.test(io._isErrorResponse(response))) {
           dart.throw(io._exceptionFromResponse(response, "length failed", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfint()._check(response);
+      }, dynamicToFutureOrOfint()));
     }
     lengthSync() {
       this[_checkAvailable]();
@@ -43010,7 +43069,7 @@
         } else {
           return this;
         }
-      }, dynamicTodynamic$()));
+      }, dynamicToFutureOrOfHttpClientResponse()));
     }
   };
   io._HttpClientResponse[dart.implements] = () => [io.HttpClientResponse];
@@ -43123,7 +43182,7 @@
         return this.done;
       }
       [_closeTarget]() {
-        this[_target$].close().then(dart.dynamic)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
+        this[_target$].close().then(dart.void)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
       }
       get done() {
         return this[_doneCompleter].future;
@@ -43157,7 +43216,7 @@
             } else {
               this[_closeTarget]();
             }
-          }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+          }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
               if (dart.test(this[_isBound])) {
                 this[_controllerCompleter].completeError(error, core.StackTrace._check(stackTrace));
                 this[_controllerCompleter] = null;
@@ -43345,8 +43404,7 @@
         contentLength: dart.definiteFunctionType(dart.void, [core.int]),
         persistentConnection: dart.definiteFunctionType(dart.void, [core.bool]),
         bufferOutput: dart.definiteFunctionType(dart.void, [core.bool])
-      }),
-      methods: () => ({add: dart.definiteFunctionType(dart.void, [ListOfint()])})
+      })
     });
     return _HttpOutboundMessage;
   });
@@ -43740,7 +43798,7 @@
     }
     get done() {
       if (this[_response] == null) {
-        this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => list[dartx._get](0), ListTodynamic()));
+        this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => FutureOrOfHttpClientResponse()._check(list[dartx._get](0)), ListToFutureOrOfHttpClientResponse()));
       }
       return this[_response];
     }
@@ -43781,7 +43839,7 @@
       } else {
         future = FutureOfHttpClientResponse().value(response);
       }
-      future.then(dart.dynamic)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
+      future.then(dart.void)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
     }
     [_onError$](error, stackTrace) {
       this[_responseCompleter].completeError(error, stackTrace);
@@ -44307,7 +44365,7 @@
         if (incoming.statusCode == 100) {
           incoming.drain(dart.dynamic)().then(dart.dynamic)(dart.fn(_ => {
             this[_subscription$].resume();
-          }, dynamicTodynamic$())).catchError(dart.fn((error, stackTrace) => {
+          }, dynamicToFutureOr$())).catchError(dart.fn((error, stackTrace) => {
             if (stackTrace === void 0) stackTrace = null;
             this[_nextResponseCompleter].completeError(new io.HttpException(core.String._check(dart.dload(error, 'message')), {uri: this[_currentUri]}), stackTrace);
             this[_nextResponseCompleter] = null;
@@ -44384,7 +44442,7 @@
             } else {
               this.destroy();
             }
-          }, dynamicTodynamic$()));
+          }, dynamicToFutureOr$()));
           if (proxyCreds != null && dart.equals(proxyCreds.scheme, io._AuthenticationScheme.DIGEST)) {
             let authInfo = incoming.headers._get("proxy-authentication-info");
             if (authInfo != null && authInfo[dartx.length] == 1) {
@@ -44402,7 +44460,7 @@
             }
           }
           request[_onIncoming](incoming);
-        }, _HttpIncomingTodynamic())).catchError(dart.fn(error => {
+        }, _HttpIncomingToFutureOr())).catchError(dart.fn(error => {
           dart.throw(new io.HttpException("Connection closed before data was received", {uri: uri}));
         }, dynamicTodynamic$()), {test: dart.fn(error => core.StateError.is(error), ObjectTobool())}).catchError(dart.fn((error, stackTrace) => {
           this.destroy();
@@ -44426,7 +44484,7 @@
     close() {
       this.closed = true;
       this[_httpClient][_connectionClosed](this);
-      this[_streamFuture].then(dart.dynamic)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
+      this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
     }
     createProxyTunnel(host, port, proxy, callback) {
       let request = this.send(core.Uri.new({host: core.String._check(host), port: core.int._check(port)}), core.int._check(port), "CONNECT", io._Proxy._check(proxy));
@@ -44585,7 +44643,7 @@
       if (client.maxConnectionsPerHost != null && dart.notNull(this[_active].length) + dart.notNull(this[_connecting]) >= dart.notNull(client.maxConnectionsPerHost)) {
         let completer = async.Completer.new();
         this[_pending$].add(dart.fn(() => {
-          this.connect(uriHost, uriPort, proxy, client).then(dart.dynamic)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
+          this.connect(uriHost, uriPort, proxy, client).then(dart.void)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
         }, VoidTodynamic$()));
         return FutureOf_ConnectionInfo()._check(completer.future);
       }
@@ -44611,7 +44669,7 @@
           this.addNewActive(connection);
           return new io._ConnectionInfo(connection, proxy);
         }
-      }, dynamicTodynamic$()), {onError: dart.fn(error => {
+      }, dynamicToFutureOrOf_ConnectionInfo()), {onError: dart.fn(error => {
           this[_connecting] = dart.notNull(this[_connecting]) - 1;
           this[_checkPending]();
           dart.throw(error);
@@ -44810,7 +44868,7 @@
           return this[_getConnection](uri.host, port, proxyConf, isSecure).then(io._HttpClientRequest)(send);
         }
         return send(info);
-      }, _ConnectionInfoTodynamic()));
+      }, _ConnectionInfoToFutureOrOf_HttpClientRequest()));
     }
     [_openUrlFromRequest](method, uri, previous) {
       let resolved = previous.uri.resolveUri(uri);
@@ -45094,7 +45152,7 @@
         this[_httpServer][_markActive](this);
         incoming.dataDone.then(dart.dynamic)(dart.fn(closing => {
           if (dart.test(closing)) this.destroy();
-        }, dynamicTodynamic$()));
+        }, dynamicToFutureOr$()));
         this[_subscription$].pause();
         this[_state$1] = io._HttpConnection._ACTIVE;
         let outgoing = new io._HttpOutgoing(io.Socket._check(this[_socket]));
@@ -45111,7 +45169,7 @@
           } else {
             this.destroy();
           }
-        }, dynamicTodynamic$()), {onError: dart.fn(_ => {
+        }, dynamicToFutureOr$()), {onError: dart.fn(_ => {
             this.destroy();
           }, dynamicTodynamic$())});
         outgoing.ignoreBody = request.method == "HEAD";
@@ -47914,8 +47972,8 @@
         if (dart.test(this[_isErrorResponse](response))) {
           dart.throw(this[_exceptionFromResponse](response, "Cannot get target of link", this.path));
         }
-        return response;
-      }, dynamicTodynamic$()));
+        return FutureOrOfString()._check(response);
+      }, dynamicToFutureOrOfString()));
     }
     targetSync() {
       let result = io._File._linkTarget(this.path);
@@ -48383,6 +48441,9 @@
       }[this.index];
     }
   };
+  dart.setSignature(io.ProcessStartMode, {
+    fields: () => ({index: core.int})
+  });
   dart.defineEnumValues(io.ProcessStartMode, [
     'NORMAL',
     'DETACHED',
@@ -48451,14 +48512,14 @@
     })
   });
   const _signalNumber = Symbol('_signalNumber');
-  const _name$1 = Symbol('_name');
+  const _name$2 = Symbol('_name');
   io.ProcessSignal = class ProcessSignal extends core.Object {
     _(signalNumber, name) {
       this[_signalNumber] = signalNumber;
-      this[_name$1] = name;
+      this[_name$2] = name;
     }
     toString() {
-      return this[_name$1];
+      return this[_name$2];
     }
     watch() {
       return io._ProcessUtils._watchSignal(this);
@@ -48469,7 +48530,7 @@
     constructors: () => ({_: dart.definiteFunctionType(io.ProcessSignal, [core.int, core.String])}),
     fields: () => ({
       [_signalNumber]: core.int,
-      [_name$1]: core.String
+      [_name$2]: core.String
     }),
     methods: () => ({watch: dart.definiteFunctionType(async.Stream$(io.ProcessSignal), [])}),
     sfields: () => ({
@@ -48825,7 +48886,7 @@
         } else {
           this[_controller$0].add(secureConnection);
         }
-      }, RawSecureSocketTodynamic())).catchError(dart.fn((e, s) => {
+      }, RawSecureSocketToFutureOr())).catchError(dart.fn((e, s) => {
         if (!dart.test(this[_closed])) {
           this[_controller$0].addError(e, core.StackTrace._check(s));
         }
@@ -49124,7 +49185,7 @@
       this[_closedWrite] = true;
       this[_closedRead] = true;
       if (this[_socket] != null) {
-        this[_socket].close().then(dart.dynamic)(dart.bind(this, _completeCloseCompleter));
+        this[_socket].close().then(dart.void)(dart.bind(this, _completeCloseCompleter));
       } else {
         this[_completeCloseCompleter]();
       }
@@ -49409,7 +49470,7 @@
             }
           }
           this[_tryFilter]();
-        }, _FilterStatusTodynamic())).catchError(dart.bind(this, _reportError));
+        }, _FilterStatusToFutureOr())).catchError(dart.bind(this, _reportError));
       }
     }
     [_readSocketOrBufferedData](bytes) {
@@ -50684,10 +50745,6 @@
       name: dart.definiteFunctionType(core.String, []),
       encoder: dart.definiteFunctionType(convert.Converter$(core.String, core.List$(core.int)), []),
       decoder: dart.definiteFunctionType(convert.Converter$(core.List$(core.int), core.String), [])
-    }),
-    methods: () => ({
-      encode: dart.definiteFunctionType(core.List$(core.int), [core.String]),
-      decode: dart.definiteFunctionType(core.String, [ListOfint()])
     })
   });
   io.SYSTEM_ENCODING = dart.const(new io.SystemEncoding());
@@ -51489,7 +51546,7 @@
     }
     bind(stream) {
       stream.listen(dart.fn(request => {
-        io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.dynamic)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
+        io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.void)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
       }, HttpRequestTovoid$()), {onDone: dart.fn(() => {
           this[_controller$0].close();
         }, VoidTovoid$())});
@@ -51902,7 +51959,7 @@
       this.socket.addStream(stream).then(dart.dynamic)(dart.fn(_ => {
         this[_done$]();
         this[_closeCompleter].complete(this.webSocket);
-      }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+      }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
           this[_closed] = true;
           this[_cancel$]();
           if (core.ArgumentError.is(error)) {
@@ -52038,7 +52095,7 @@
         function error(message) {
           response.detachSocket().then(dart.dynamic)(dart.fn(socket => {
             socket.destroy();
-          }, SocketTodynamic()));
+          }, SocketToFutureOr()));
           dart.throw(new io.WebSocketException(message));
         }
         dart.fn(error, StringTovoid$());
@@ -52883,14 +52940,7 @@
         [_checkIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
         [_checkInsertIndex]: dart.definiteFunctionType(dart.dynamic, [core.int]),
         _get: dart.definiteFunctionType(E, [core.Object]),
-        _set: dart.definiteFunctionType(dart.void, [core.Object, E]),
-        add: dart.definiteFunctionType(dart.void, [E]),
-        addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
-        insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-        removeAt: dart.definiteFunctionType(E, [core.int]),
-        removeLast: dart.definiteFunctionType(E, []),
-        setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-        sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()])
+        _set: dart.definiteFunctionType(dart.void, [core.Object, E])
       }),
       statics: () => ({_checkRange: dart.definiteFunctionType(dart.dynamic, [core.int, core.int, core.int])}),
       names: ['_checkRange']
@@ -55446,15 +55496,15 @@
       let completer = CompleterOfDatabase().new();
       this[dartx.onComplete].first.then(dart.dynamic)(dart.fn(_ => {
         completer.complete(this[dartx.db]);
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       this[dartx.onError].first.then(dart.dynamic)(dart.fn(e => {
         completer.completeError(e);
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       this[dartx.onAbort].first.then(dart.dynamic)(dart.fn(e => {
         if (!dart.test(completer.isCompleted)) {
           completer.completeError(e);
         }
-      }, EventTodynamic()));
+      }, EventToFutureOr()));
       return completer.future;
     }
     static _() {
@@ -72213,17 +72263,11 @@
   html$.DomStringList[dart.implements] = () => [ListOfString()];
   dart.setSignature(html$.DomStringList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.DomStringList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.String, []),
-      [dartx.last]: dart.definiteFunctionType(core.String, []),
-      [dartx.single]: dart.definiteFunctionType(core.String, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
       [__getter__]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx.item]: dart.definiteFunctionType(core.String, [core.int])
     })
@@ -72392,10 +72436,6 @@
     }),
     getters: () => ({
       length: dart.definiteFunctionType(core.int, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Element), []),
-      first: dart.definiteFunctionType(html$.Element, []),
-      last: dart.definiteFunctionType(html$.Element, []),
-      single: dart.definiteFunctionType(html$.Element, []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
@@ -72403,18 +72443,7 @@
       _get: dart.definiteFunctionType(html$.Element, [core.int]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
       add: dart.definiteFunctionType(html$.Element, [html$.Element]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-      sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-      removeWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-      retainWhere: dart.definiteFunctionType(dart.void, [ElementTobool()]),
-      [_filter$0]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-      replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Element]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-      removeAt: dart.definiteFunctionType(html$.Element, [core.int]),
-      removeLast: dart.definiteFunctionType(html$.Element, [])
+      [_filter$0]: dart.definiteFunctionType(dart.void, [ElementTobool(), core.bool])
     })
   });
   dart.defineExtensionMembers(html$._ChildrenElementList, [
@@ -72729,9 +72758,6 @@
       fields: () => ({[_nodeList]: ListOfNode()}),
       getters: () => ({
         length: dart.definiteFunctionType(core.int, []),
-        first: dart.definiteFunctionType(E, []),
-        last: dart.definiteFunctionType(E, []),
-        single: dart.definiteFunctionType(E, []),
         classes: dart.definiteFunctionType(html$.CssClassSet, []),
         style: dart.definiteFunctionType(html$.CssStyleDeclarationBase, []),
         contentEdge: dart.definiteFunctionType(html$.CssRect, []),
@@ -72815,8 +72841,7 @@
       }),
       methods: () => ({
         _get: dart.definiteFunctionType(E, [core.int]),
-        _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-        sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfE()])
+        _set: dart.definiteFunctionType(dart.void, [core.int, E])
       })
     });
     dart.defineExtensionMembers(_FrozenElementList, [
@@ -73584,17 +73609,11 @@
   html$.FileList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfFile()];
   dart.setSignature(html$.FileList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.FileList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.File, []),
-      [dartx.last]: dart.definiteFunctionType(html$.File, []),
-      [dartx.single]: dart.definiteFunctionType(html$.File, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.File, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.File]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.File, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.File, [core.int])
     })
   });
@@ -75662,17 +75681,11 @@
   html$.HtmlCollection[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$.HtmlCollection, {
     constructors: () => ({_: dart.definiteFunctionType(html$.HtmlCollection, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(core.Object, [core.String])
     })
@@ -80856,17 +80869,11 @@
   html$.MimeTypeArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfMimeType()];
   dart.setSignature(html$.MimeTypeArray, {
     constructors: () => ({_: dart.definiteFunctionType(html$.MimeTypeArray, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.MimeType, []),
-      [dartx.last]: dart.definiteFunctionType(html$.MimeType, []),
-      [dartx.single]: dart.definiteFunctionType(html$.MimeType, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.MimeType]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.MimeType, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(html$.MimeType, [core.String])
     })
@@ -81206,7 +81213,7 @@
     }
     static new(callback) {
       0;
-      return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(html$._wrapZoneBinaryCallback)(html$._wrapBinaryZone(dart.dynamic, dart.dynamic, dart.dynamic)(callback), 2));
+      return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void())(html$._wrapBinaryZone(ListOfMutationRecord(), html$.MutationObserver, dart.void)(callback), 2));
     }
   };
   dart.setSignature(html$.MutationObserver, {
@@ -81899,29 +81906,13 @@
     constructors: () => ({new: dart.definiteFunctionType(html$._ChildNodeListLazy, [html$.Node])}),
     fields: () => ({[_this]: html$.Node}),
     getters: () => ({
-      first: dart.definiteFunctionType(html$.Node, []),
-      last: dart.definiteFunctionType(html$.Node, []),
-      single: dart.definiteFunctionType(html$.Node, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Node), []),
       length: dart.definiteFunctionType(core.int, []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
-      add: dart.definiteFunctionType(dart.void, [html$.Node]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfNode()]),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-      setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfNode()]),
-      removeLast: dart.definiteFunctionType(html$.Node, []),
-      removeAt: dart.definiteFunctionType(html$.Node, [core.int]),
       [_filter$0]: dart.definiteFunctionType(dart.void, [NodeTobool(), core.bool]),
-      removeWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
-      retainWhere: dart.definiteFunctionType(dart.void, [NodeTobool()]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      sort: dart.definiteFunctionType(dart.void, [], [ComparatorOfNode()]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfNode()], [core.int]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Node]),
       _get: dart.definiteFunctionType(html$.Node, [core.int])
     })
   });
@@ -82098,17 +82089,11 @@
   html$.NodeList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$.NodeList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.NodeList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [_item]: dart.definiteFunctionType(html$.Node, [core.int])
     })
   });
@@ -83789,17 +83774,11 @@
   html$.PluginArray[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfPlugin()];
   dart.setSignature(html$.PluginArray, {
     constructors: () => ({_: dart.definiteFunctionType(html$.PluginArray, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Plugin, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Plugin, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Plugin, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Plugin]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Plugin, [core.int]),
       [dartx.namedItem]: dart.definiteFunctionType(html$.Plugin, [core.String]),
       [dartx.refresh]: dart.definiteFunctionType(dart.void, [core.bool])
@@ -87271,17 +87250,11 @@
   html$.SourceBufferList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSourceBuffer()];
   dart.setSignature(html$.SourceBufferList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.SourceBufferList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SourceBuffer, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SourceBuffer, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SourceBuffer, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SourceBuffer, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SourceBuffer]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SourceBuffer, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.SourceBuffer, [core.int])
     })
   });
@@ -87525,17 +87498,11 @@
       _: dart.definiteFunctionType(html$.SpeechGrammarList, []),
       new: dart.definiteFunctionType(html$.SpeechGrammarList, [])
     }),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SpeechGrammar, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SpeechGrammar, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SpeechGrammar, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SpeechGrammar]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int]),
       [dartx.addFromString]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
       [dartx.addFromUri]: dart.definiteFunctionType(dart.void, [core.String], [core.num]),
       [dartx.item]: dart.definiteFunctionType(html$.SpeechGrammar, [core.int])
@@ -89733,17 +89700,11 @@
   html$.TextTrackCueList[dart.implements] = () => [ListOfTextTrackCue(), _js_helper.JavaScriptIndexingBehavior];
   dart.setSignature(html$.TextTrackCueList, {
     constructors: () => ({_: dart.definiteFunctionType(html$.TextTrackCueList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.TextTrackCue, []),
-      [dartx.last]: dart.definiteFunctionType(html$.TextTrackCue, []),
-      [dartx.single]: dart.definiteFunctionType(html$.TextTrackCue, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.TextTrackCue, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.TextTrackCue]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.TextTrackCue, [core.int]),
       [dartx.getCueById]: dart.definiteFunctionType(html$.TextTrackCue, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.TextTrackCue, [core.int])
     })
@@ -89823,9 +89784,6 @@
     constructors: () => ({_: dart.definiteFunctionType(html$.TextTrackList, [])}),
     getters: () => ({
       [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.TextTrack, []),
-      [dartx.last]: dart.definiteFunctionType(html$.TextTrack, []),
-      [dartx.single]: dart.definiteFunctionType(html$.TextTrack, []),
       [dartx.onAddTrack]: dart.definiteFunctionType(async.Stream$(html$.TrackEvent), []),
       [dartx.onChange]: dart.definiteFunctionType(async.Stream$(html$.Event), [])
     }),
@@ -89833,7 +89791,6 @@
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.TextTrack, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.TextTrack]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.TextTrack, [core.int]),
       [dartx.getTrackById]: dart.definiteFunctionType(html$.TextTrack, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.TextTrack, [core.int])
     }),
@@ -90184,17 +90141,11 @@
       new: dart.definiteFunctionType(html$.TouchList, []),
       _: dart.definiteFunctionType(html$.TouchList, [])
     }),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Touch, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Touch, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Touch, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Touch, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Touch]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Touch, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Touch, [core.int])
     }),
     sgetters: () => ({supported: dart.definiteFunctionType(core.bool, [])})
@@ -94068,17 +94019,11 @@
   html$._ClientRectList[dart.implements] = () => [ListOfRectangleOfnum()];
   dart.setSignature(html$._ClientRectList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._ClientRectList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-      [dartx.last]: dart.definiteFunctionType(math.Rectangle$(core.num), []),
-      [dartx.single]: dart.definiteFunctionType(math.Rectangle$(core.num), [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, RectangleOfnum()]),
-      [dartx.elementAt]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [__getter__]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int]),
       [dartx.item]: dart.definiteFunctionType(math.Rectangle$(core.num), [core.int])
     })
@@ -94145,17 +94090,11 @@
   html$._CssRuleList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfCssRule()];
   dart.setSignature(html$._CssRuleList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._CssRuleList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.CssRule, []),
-      [dartx.last]: dart.definiteFunctionType(html$.CssRule, []),
-      [dartx.single]: dart.definiteFunctionType(html$.CssRule, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.CssRule, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.CssRule]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.CssRule, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.CssRule, [core.int])
     })
   });
@@ -94398,17 +94337,11 @@
   html$._GamepadList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfGamepad()];
   dart.setSignature(html$._GamepadList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._GamepadList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Gamepad, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Gamepad, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Gamepad, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Gamepad, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Gamepad]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Gamepad, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.Gamepad, [core.int])
     })
   });
@@ -94607,17 +94540,11 @@
   html$._NamedNodeMap[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfNode()];
   dart.setSignature(html$._NamedNodeMap, {
     constructors: () => ({_: dart.definiteFunctionType(html$._NamedNodeMap, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.last]: dart.definiteFunctionType(html$.Node, []),
-      [dartx.single]: dart.definiteFunctionType(html$.Node, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.Node]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.Node, [core.int]),
       [dartx.getNamedItem]: dart.definiteFunctionType(html$._Attr, [core.String]),
       [dartx.getNamedItemNS]: dart.definiteFunctionType(html$._Attr, [core.String, core.String]),
       [dartx.item]: dart.definiteFunctionType(html$._Attr, [core.int]),
@@ -94817,17 +94744,11 @@
   html$._SpeechRecognitionResultList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfSpeechRecognitionResult()];
   dart.setSignature(html$._SpeechRecognitionResultList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._SpeechRecognitionResultList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.SpeechRecognitionResult, []),
-      [dartx.last]: dart.definiteFunctionType(html$.SpeechRecognitionResult, []),
-      [dartx.single]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.SpeechRecognitionResult]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int]),
       [dartx.item]: dart.definiteFunctionType(html$.SpeechRecognitionResult, [core.int])
     })
   });
@@ -94895,17 +94816,11 @@
   html$._StyleSheetList[dart.implements] = () => [_js_helper.JavaScriptIndexingBehavior, ListOfStyleSheet()];
   dart.setSignature(html$._StyleSheetList, {
     constructors: () => ({_: dart.definiteFunctionType(html$._StyleSheetList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(html$.StyleSheet, []),
-      [dartx.last]: dart.definiteFunctionType(html$.StyleSheet, []),
-      [dartx.single]: dart.definiteFunctionType(html$.StyleSheet, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(html$.StyleSheet, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, html$.StyleSheet]),
-      [dartx.elementAt]: dart.definiteFunctionType(html$.StyleSheet, [core.int]),
       [__getter__]: dart.definiteFunctionType(html$.CssStyleSheet, [core.String]),
       [dartx.item]: dart.definiteFunctionType(html$.StyleSheet, [core.int])
     })
@@ -96287,10 +96202,7 @@
         [_eventType]: core.String,
         [_useCapture]: core.bool
       }),
-      methods: () => ({
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
-        listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})
-      })
+      methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
     });
     return _EventStream;
   });
@@ -96391,8 +96303,7 @@
       methods: () => ({
         matches: dart.definiteFunctionType(async.Stream$(T), [core.String]),
         listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-        capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()]),
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()})
+        capture: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()])
       })
     });
     return _ElementListEventStreamImpl;
@@ -96554,7 +96465,6 @@
       }),
       methods: () => ({
         listen: dart.definiteFunctionType(async.StreamSubscription$(T), [TTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
-        asBroadcastStream: dart.definiteFunctionType(async.Stream$(T), [], {onListen: StreamSubscriptionOfTTovoid(), onCancel: StreamSubscriptionOfTTovoid()}),
         add: dart.definiteFunctionType(dart.void, [T])
       })
     });
@@ -96832,8 +96742,7 @@
   dart.addSimpleTypeTests(html$._CustomKeyEventStreamImpl);
   html$._CustomKeyEventStreamImpl[dart.implements] = () => [CustomStreamOfKeyEvent()];
   dart.setSignature(html$._CustomKeyEventStreamImpl, {
-    constructors: () => ({new: dart.definiteFunctionType(html$._CustomKeyEventStreamImpl, [core.String])}),
-    methods: () => ({add: dart.definiteFunctionType(dart.void, [html$.KeyEvent])})
+    constructors: () => ({new: dart.definiteFunctionType(html$._CustomKeyEventStreamImpl, [core.String])})
   });
   const _subscriptions = Symbol('_subscriptions');
   const _controller$1 = Symbol('_controller');
@@ -98422,21 +98331,13 @@
       constructors: () => ({new: dart.definiteFunctionType(html$._WrappedList$(E), [ListOfNode()])}),
       fields: () => ({[_list$]: ListOfNode()}),
       getters: () => ({
-        iterator: dart.definiteFunctionType(core.Iterator$(E), []),
         length: dart.definiteFunctionType(core.int, []),
         rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
       }),
       setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
       methods: () => ({
-        add: dart.definiteFunctionType(dart.void, [E]),
         _get: dart.definiteFunctionType(E, [core.int]),
-        _set: dart.definiteFunctionType(dart.void, [core.int, E]),
-        sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()]),
-        insert: dart.definiteFunctionType(dart.void, [core.int, E]),
-        removeAt: dart.definiteFunctionType(E, [core.int]),
-        setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()], [core.int]),
-        replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfE()]),
-        fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [E])
+        _set: dart.definiteFunctionType(dart.void, [core.int, E])
       })
     });
     dart.defineExtensionMembers(_WrappedList, [
@@ -99789,25 +99690,12 @@
     getters: () => ({
       [_iterable$0]: dart.definiteFunctionType(core.Iterable$(html$.Element), []),
       [_filtered]: dart.definiteFunctionType(core.List$(html$.Element), []),
-      reversed: dart.definiteFunctionType(core.Iterable$(html$.Element), []),
       length: dart.definiteFunctionType(core.int, []),
-      iterator: dart.definiteFunctionType(core.Iterator$(html$.Element), []),
       rawList: dart.definiteFunctionType(core.List$(html$.Node), [])
     }),
     setters: () => ({length: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
-      forEach: dart.definiteFunctionType(dart.void, [ElementTovoid()]),
       _set: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      add: dart.definiteFunctionType(dart.void, [html$.Element]),
-      addAll: dart.definiteFunctionType(dart.void, [IterableOfElement()]),
-      sort: dart.definiteFunctionType(dart.void, [], [ElementAndElementToint()]),
-      setRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()], [core.int]),
-      fillRange: dart.definiteFunctionType(dart.void, [core.int, core.int], [html$.Element]),
-      replaceRange: dart.definiteFunctionType(dart.void, [core.int, core.int, IterableOfElement()]),
-      removeLast: dart.definiteFunctionType(html$.Element, []),
-      insert: dart.definiteFunctionType(dart.void, [core.int, html$.Element]),
-      insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfElement()]),
-      removeAt: dart.definiteFunctionType(html$.Element, [core.int]),
       _get: dart.definiteFunctionType(html$.Element, [core.int])
     })
   });
@@ -103478,17 +103366,11 @@
   dart.setSignature(svg$.LengthList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.LengthList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Length, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Length, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Length, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Length, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Length]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Length, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Length]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Length, [svg$.Length]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.Length, [core.int]),
@@ -104084,17 +103966,11 @@
   dart.setSignature(svg$.NumberList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.NumberList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Number, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Number, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Number, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Number, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Number]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Number, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Number]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Number, [svg$.Number]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.Number, [core.int]),
@@ -105069,17 +104945,11 @@
   dart.setSignature(svg$.PathSegList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.PathSegList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.PathSeg, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.PathSeg, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.PathSeg, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.PathSeg]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.PathSeg]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.PathSeg, [svg$.PathSeg]),
       [dartx.getItem]: dart.definiteFunctionType(svg$.PathSeg, [core.int]),
@@ -105834,17 +105704,11 @@
   dart.setSignature(svg$.StringList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.StringList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.String, []),
-      [dartx.last]: dart.definiteFunctionType(core.String, []),
-      [dartx.single]: dart.definiteFunctionType(core.String, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.String, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.String, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, core.String]),
       [dartx.appendItem]: dart.definiteFunctionType(core.String, [core.String]),
       [dartx.getItem]: dart.definiteFunctionType(core.String, [core.int]),
@@ -106718,17 +106582,11 @@
   dart.setSignature(svg$.TransformList, {
     constructors: () => ({_: dart.definiteFunctionType(svg$.TransformList, [])}),
     fields: () => ({[dartx.numberOfItems]: core.int}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(svg$.Transform, []),
-      [dartx.last]: dart.definiteFunctionType(svg$.Transform, []),
-      [dartx.single]: dart.definiteFunctionType(svg$.Transform, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(svg$.Transform, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, svg$.Transform]),
-      [dartx.elementAt]: dart.definiteFunctionType(svg$.Transform, [core.int]),
       [__setter__$]: dart.definiteFunctionType(dart.void, [core.int, svg$.Transform]),
       [dartx.appendItem]: dart.definiteFunctionType(svg$.Transform, [svg$.Transform]),
       [dartx.consolidate]: dart.definiteFunctionType(svg$.Transform, []),
@@ -110765,17 +110623,11 @@
   web_sql.SqlResultSetRowList[dart.implements] = () => [ListOfMap()];
   dart.setSignature(web_sql.SqlResultSetRowList, {
     constructors: () => ({_: dart.definiteFunctionType(web_sql.SqlResultSetRowList, [])}),
-    getters: () => ({
-      [dartx.length]: dart.definiteFunctionType(core.int, []),
-      [dartx.first]: dart.definiteFunctionType(core.Map, []),
-      [dartx.last]: dart.definiteFunctionType(core.Map, []),
-      [dartx.single]: dart.definiteFunctionType(core.Map, [])
-    }),
+    getters: () => ({[dartx.length]: dart.definiteFunctionType(core.int, [])}),
     setters: () => ({[dartx.length]: dart.definiteFunctionType(dart.void, [core.int])}),
     methods: () => ({
       [dartx._get]: dart.definiteFunctionType(core.Map, [core.int]),
       [dartx._set]: dart.definiteFunctionType(dart.void, [core.int, core.Map]),
-      [dartx.elementAt]: dart.definiteFunctionType(core.Map, [core.int]),
       [dartx.item]: dart.definiteFunctionType(core.Map, [core.int]),
       [_item_1]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
     })
diff --git a/pkg/dev_compiler/lib/sdk/ddc_sdk.sum b/pkg/dev_compiler/lib/sdk/ddc_sdk.sum
index 9faed73..52d97c2 100644
--- a/pkg/dev_compiler/lib/sdk/ddc_sdk.sum
+++ b/pkg/dev_compiler/lib/sdk/ddc_sdk.sum
Binary files differ
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
index 0606bbf..79ac857 100644
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
@@ -1167,8 +1167,21 @@
     var classExpr = new JS.ClassExpression(new JS.Identifier(type.name),
         _emitClassHeritage(element), [constructor, toStringF]);
     var id = _emitTopLevelName(element);
+
+    // Emit metadata for synthetic enum index member.
+    // TODO(jacobr): make field readonly when that is supported.
+    var tInstanceFields = <JS.Property>[
+      new JS.Property(
+          _emitMemberName('index'), _emitAnnotatedType(intClass.type, null))
+    ];
+    var sigFields = <JS.Property>[
+      _buildSignatureField('fields', tInstanceFields)
+    ];
+    var sig = new JS.ObjectInitializer(sigFields);
+
     var result = [
-      js.statement('# = #', [id, classExpr])
+      js.statement('# = #', [id, classExpr]),
+      _callHelperStatement('setSignature(#, #);', [id, sig])
     ];
 
     // defineEnumValues internally depends on dart.constList which uses
@@ -1261,8 +1274,9 @@
     }
 
     // List of "direct" JS superclasses
-    var baseclasses =
-        basetypes.map((t) => _emitType(t, nameType: false)).toList();
+    var baseclasses = basetypes
+        .map((t) => _emitConstructorAccess(t, nameType: false))
+        .toList();
     assert(baseclasses.isNotEmpty);
     var heritage = (baseclasses.length == 1)
         ? baseclasses.first
@@ -1506,7 +1520,7 @@
 
     var fnBody = js.call('this.noSuchMethod(new #.InvocationImpl(#, #, #))', [
       _runtimeModule,
-      _declareMemberName(method),
+      _declareMemberName(method, useDisplayName: true),
       positionalArgs,
       new JS.ObjectInitializer(invocationProps)
     ]);
@@ -1771,6 +1785,13 @@
     }
   }
 
+  JS.Property _buildSignatureField(String name, List<JS.Property> elements) {
+    var o = new JS.ObjectInitializer(elements, multiline: elements.length > 1);
+    // TODO(vsm): Remove
+    var e = js.call('() => #', o);
+    return new JS.Property(_propertyName(name), e);
+  }
+
   /// Emit the signature on the class recording the runtime type information
   void _emitClassSignature(
       List<MethodDeclaration> methods,
@@ -1804,25 +1825,32 @@
         continue;
       }
 
-      Function lookup;
       List<JS.Property> tMember;
+      Function getOverride;
+      Function lookup;
+      Function elementToType;
       if (node.isGetter) {
-        lookup = classElem.lookUpInheritedConcreteGetter;
+        elementToType = (ExecutableElement element) => element.type;
+        getOverride = classElem.lookUpInheritedConcreteGetter;
+        lookup = classElem.type.lookUpInheritedGetter;
         tMember = node.isStatic ? tStaticGetters : tInstanceGetters;
       } else if (node.isSetter) {
-        lookup = classElem.lookUpInheritedConcreteSetter;
+        elementToType = (ExecutableElement element) => element.type;
+        getOverride = classElem.lookUpInheritedConcreteSetter;
+        lookup = classElem.type.lookUpInheritedSetter;
         tMember = node.isStatic ? tStaticSetters : tInstanceSetters;
       } else {
         // Method
-        lookup = classElem.lookUpInheritedConcreteMethod;
+        // Swap in "Object" for parameter types that are covariant overrides.
+        var objectType = context.typeProvider.objectType;
+        elementToType =
+            (MethodElement element) => element.getReifiedType(objectType);
+        getOverride = classElem.lookUpInheritedConcreteMethod;
+        lookup = classElem.type.lookUpInheritedMethod;
         tMember = node.isStatic ? tStaticMethods : tInstanceMethods;
       }
 
-      // Swap in "Object" for parameter types that are covariant overrides.
-      var objectType = context.typeProvider.objectType;
-      var reifiedType = element is MethodElement
-          ? element.getReifiedType(objectType)
-          : element.type;
+      DartType reifiedType = elementToType(element);
       var type = _emitAnnotatedFunctionType(reifiedType, node.metadata,
           parameters: node.parameters?.parameters,
           nameType: options.hoistSignatureTypes,
@@ -1830,17 +1858,14 @@
           definite: true);
 
       // Don't add redundant signatures for inherited methods whose signature
-      // did not change.
-      var needsSignature = true;
-      var inheritedElement = lookup(name, currentLibrary);
-      if (inheritedElement != null) {
-        if (inheritedElement is MethodElement) {
-          needsSignature =
-              inheritedElement.getReifiedType(objectType) != reifiedType;
-        } else {
-          needsSignature = inheritedElement.type != reifiedType;
-        }
-      }
+      // did not change.  If we are not overriding, or if the thing we are
+      // overriding has a different reified type from ourselves, we must
+      // emit a signature on this class.  Otherwise we will inherit the
+      // signature from the superclass.
+      var needsSignature = getOverride(name, currentLibrary) == null ||
+          elementToType(
+                  lookup(name, library: currentLibrary, thisType: false)) !=
+              reifiedType;
 
       if (needsSignature) {
         var memberName = _declareMemberName(element);
@@ -1878,45 +1903,37 @@
       tCtors.add(property);
     }
 
-    JS.Property build(String name, List<JS.Property> elements) {
-      var o =
-          new JS.ObjectInitializer(elements, multiline: elements.length > 1);
-      // TODO(vsm): Remove
-      var e = js.call('() => #', o);
-      return new JS.Property(_propertyName(name), e);
-    }
-
     var sigFields = <JS.Property>[];
     if (!tCtors.isEmpty) {
-      sigFields.add(build('constructors', tCtors));
+      sigFields.add(_buildSignatureField('constructors', tCtors));
     }
     if (!tInstanceFields.isEmpty) {
-      sigFields.add(build('fields', tInstanceFields));
+      sigFields.add(_buildSignatureField('fields', tInstanceFields));
     }
     if (!tInstanceGetters.isEmpty) {
-      sigFields.add(build('getters', tInstanceGetters));
+      sigFields.add(_buildSignatureField('getters', tInstanceGetters));
     }
     if (!tInstanceSetters.isEmpty) {
-      sigFields.add(build('setters', tInstanceSetters));
+      sigFields.add(_buildSignatureField('setters', tInstanceSetters));
     }
     if (!tInstanceMethods.isEmpty) {
-      sigFields.add(build('methods', tInstanceMethods));
+      sigFields.add(_buildSignatureField('methods', tInstanceMethods));
     }
     if (!tStaticFields.isEmpty) {
-      sigFields.add(build('sfields', tStaticFields));
+      sigFields.add(_buildSignatureField('sfields', tStaticFields));
     }
     if (!tStaticGetters.isEmpty) {
-      sigFields.add(build('sgetters', tStaticGetters));
+      sigFields.add(_buildSignatureField('sgetters', tStaticGetters));
     }
     if (!tStaticSetters.isEmpty) {
-      sigFields.add(build('ssetters', tStaticSetters));
+      sigFields.add(_buildSignatureField('ssetters', tStaticSetters));
     }
     if (!tStaticMethods.isEmpty) {
       assert(!sNames.isEmpty);
       // TODO(vsm): Why do we need this names field?
       var aNames = new JS.Property(
           _propertyName('names'), new JS.ArrayInitializer(sNames));
-      sigFields.add(build('statics', tStaticMethods));
+      sigFields.add(_buildSignatureField('statics', tStaticMethods));
       sigFields.add(aNames);
     }
     if (!sigFields.isEmpty || extensions.isNotEmpty) {
@@ -1964,14 +1981,14 @@
   }
 
   List<ExecutableElement> _extensionsToImplement(ClassElement element) {
-    var members = <ExecutableElement>[];
-    if (_extensionTypes.isNativeClass(element)) return members;
+    if (_extensionTypes.isNativeClass(element)) return [];
 
     // Collect all extension types we implement.
     var type = element.type;
     var types = _extensionTypes.collectNativeInterfaces(element);
-    if (types.isEmpty) return members;
+    if (types.isEmpty) return [];
 
+    var members = new Set<ExecutableElement>();
     // Collect all possible extension method names.
     var extensionMembers = new HashSet<String>();
     for (var t in types) {
@@ -1986,7 +2003,9 @@
         members.add(m);
       }
     }
-    return members;
+    members.addAll(_collectMockMethods(type)
+        .where((m) => extensionMembers.contains(m.name)));
+    return members.toList();
   }
 
   /// Generates the implicit default constructor for class C of the form
@@ -5496,17 +5515,14 @@
   ///
   /// Unlike call sites, we always have an element available, so we can use it
   /// directly rather than computing the relevant options for [_emitMemberName].
-  JS.Expression _declareMemberName(ExecutableElement e, {bool useExtension}) {
-    String name;
-    if (e is PropertyAccessorElement) {
-      name = e.variable.name;
-    } else {
-      name = e.name;
-    }
+  JS.Expression _declareMemberName(ExecutableElement e,
+      {bool useExtension, useDisplayName = false}) {
+    var name = (e is PropertyAccessorElement) ? e.variable.name : e.name;
     return _emitMemberName(name,
         isStatic: e.isStatic,
         useExtension:
-            useExtension ?? _extensionTypes.isNativeClass(e.enclosingElement));
+            useExtension ?? _extensionTypes.isNativeClass(e.enclosingElement),
+        useDisplayName: useDisplayName);
   }
 
   /// This handles member renaming for private names and operators.
@@ -5553,6 +5569,7 @@
       {DartType type,
       bool isStatic: false,
       bool useExtension,
+      bool useDisplayName: false,
       Element element}) {
     // Static members skip the rename steps and may require JS interop renames.
     if (isStatic) {
@@ -5565,20 +5582,22 @@
 
     // When generating synthetic names, we use _ as the prefix, since Dart names
     // won't have this (eliminated above), nor will static names reach here.
-    switch (name) {
-      case '[]':
-        name = '_get';
-        break;
-      case '[]=':
-        name = '_set';
-        break;
-      case 'unary-':
-        name = '_negate';
-        break;
-      case 'constructor':
-      case 'prototype':
-        name = '_$name';
-        break;
+    if (!useDisplayName) {
+      switch (name) {
+        case '[]':
+          name = '_get';
+          break;
+        case '[]=':
+          name = '_set';
+          break;
+        case 'unary-':
+          name = '_negate';
+          break;
+        case 'constructor':
+        case 'prototype':
+          name = '_$name';
+          break;
+      }
     }
 
     var result = _propertyName(name);
diff --git a/pkg/dev_compiler/lib/src/compiler/compiler.dart b/pkg/dev_compiler/lib/src/compiler/compiler.dart
index 5a84af3..75337de 100644
--- a/pkg/dev_compiler/lib/src/compiler/compiler.dart
+++ b/pkg/dev_compiler/lib/src/compiler/compiler.dart
@@ -5,14 +5,16 @@
 import 'dart:collection' show HashSet, Queue;
 import 'dart:convert' show BASE64, JSON, UTF8;
 import 'dart:io' show File;
-import 'package:analyzer/dart/element/element.dart' show LibraryElement;
+
 import 'package:analyzer/analyzer.dart'
     show AnalysisError, CompilationUnit, ErrorSeverity;
+import 'package:analyzer/dart/element/element.dart' show LibraryElement;
 import 'package:analyzer/file_system/file_system.dart' show ResourceProvider;
 import 'package:analyzer/file_system/physical_file_system.dart'
     show PhysicalResourceProvider;
 import 'package:analyzer/src/context/builder.dart' show ContextBuilder;
 import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl;
+import 'package:analyzer/src/error/codes.dart' show StaticTypeWarningCode;
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisContext, AnalysisEngine;
 import 'package:analyzer/src/generated/sdk.dart' show DartSdkManager;
@@ -22,7 +24,6 @@
     show Source, SourceKind, UriResolver;
 import 'package:analyzer/src/summary/package_bundle_reader.dart'
     show InSummarySource, InputPackagesResultProvider, SummaryDataStore;
-import 'package:analyzer/src/error/codes.dart' show StaticTypeWarningCode;
 import 'package:args/args.dart' show ArgParser, ArgResults;
 import 'package:args/src/usage_exception.dart' show UsageException;
 import 'package:func/func.dart' show Func1;
@@ -86,6 +87,10 @@
     // Read the summaries.
     var summaryData =
         new SummaryDataStore(options.summaryPaths, recordDependencyInfo: true);
+    var sdkSummaryBundle = sdk.getLinkedBundle();
+    if (sdkSummaryBundle != null) {
+      summaryData.addBundle(null, sdkSummaryBundle);
+    }
 
     var srcFactory = createSourceFactory(options,
         sdkResolver: sdkResolver,
@@ -97,9 +102,10 @@
         AnalysisEngine.instance.createAnalysisContext() as AnalysisContextImpl;
     context.analysisOptions = analysisOptions;
     context.sourceFactory = srcFactory;
-    context.typeProvider = sdkResolver.dartSdk.context.typeProvider;
-    context.resultProvider =
-        new InputPackagesResultProvider(context, summaryData);
+    if (sdkSummaryBundle != null) {
+      context.resultProvider =
+          new InputPackagesResultProvider(context, summaryData);
+    }
     options.declaredVariables.forEach(context.declaredVariables.define);
     context.declaredVariables.define('dart.isVM', 'false');
 
diff --git a/pkg/dev_compiler/test/browser/language_tests.js b/pkg/dev_compiler/test/browser/language_tests.js
index d7222dc..310242f 100644
--- a/pkg/dev_compiler/test/browser/language_tests.js
+++ b/pkg/dev_compiler/test/browser/language_tests.js
@@ -45,7 +45,7 @@
 
   // The number of expected unittest errors should be zero but unfortunately
   // there are a lot of broken html unittests.
-  let num_expected_unittest_fails = 3;
+  let num_expected_unittest_fails = 4;
   let num_expected_unittest_errors = 0;
 
   // TODO(jmesserly): separate StrongModeError from other errors.
@@ -74,7 +74,7 @@
       'async_star_test_05_multi': async_unittest,
 
       'async_switch_test': fail,
-      'asyncstar_throw_in_catch_test': fail,
+      'asyncstar_throw_in_catch_test': ['skip', 'fail'],
       'await_future_test': skip_timeout,
       'bit_operations_test_none_multi': fail,  // DDC/dart2js canonicalize bitop results to unsigned
       'branch_canonicalization_test': fail,  // JS bit operations truncate to 32 bits.
@@ -88,6 +88,7 @@
       'cast_test_02_multi': fail,
       'cast_test_03_multi': fail,
       'cast_test_07_multi': fail,
+      'cast_test_08_multi': fail, // (oc as dynamic).bar;  /// 08: runtime error
       'cast_test_10_multi': fail,
       'cast_test_12_multi': fail,
       'cast_test_13_multi': fail,
@@ -133,9 +134,10 @@
       'f_bounded_quantification3_test': fail,
       'field_increment_bailout_test': fail,
       'field_optimization3_test': fail,
+      'field_type_check2_test_01_multi': fail, // 01: dynamic type error
       'final_syntax_test_08_multi': fail,
       'first_class_types_test': fail,
-      'for_variable_capture_test': chrome_fail,
+      'for_variable_capture_test': is.firefox('<=50') ? pass : fail,
       'function_subtype0_test': fail,
       'function_subtype1_test': fail,
       'function_subtype2_test': fail,
@@ -194,7 +196,6 @@
       'instanceof4_test_none_multi': fail,
       'instanceof_optimized_test': fail,
       'integer_division_by_zero_test': fail,
-      'is_nan_test': fail,
       'issue_22780_test_01_multi': fail,
       'lazy_static3_test': fail,
       'least_upper_bound_expansive_test_none_multi': fail,
@@ -222,7 +223,7 @@
       'mixin_regress_13688_test': fail,
       'modulo_test': fail,
       'named_parameter_clash_test': fail,
-      'named_parameters_passing_falsy_test': firefox_fail,
+      'named_parameters_passing_falsy_test': is.firefox('<=50') ? fail : pass,
       'nan_identical_test': fail,
       'nested_switch_label_test': fail,
       'number_identifier_test_05_multi': fail,
@@ -294,7 +295,7 @@
       'double_parse_test_02_multi': firefox_fail,
       'error_stack_trace1_test': fail,
       'error_stack_trace2_test': fail,
-      'for_in_test': firefox_fail,
+      'for_in_test': is.firefox('<=50') ? fail : pass,
       'hash_map2_test': skip_timeout,
       'hash_set_test_01_multi': fail,
       'hidden_library2_test_01_multi': fail,
@@ -316,14 +317,14 @@
       'main_test': fail,
       'map_keys2_test': fail,
       'map_to_string_test': fail,
-      'map_from_iterable_test': firefox_fail,
+      'map_from_iterable_test': is.firefox('<=50') ? fail : pass,
       'nan_infinity_test_01_multi': fail,
       'null_nosuchmethod_test': fail,
       'null_test': fail,
       'num_sign_test': fail,
       'regress_r21715_test': fail,
       'throw_half_surrogate_pair_test_02_multi': fail,
-      'splay_tree_from_iterable_test': firefox_fail,
+      'splay_tree_from_iterable_test': is.firefox('<=50') ? fail : pass,
       'string_case_test_01_multi': firefox_fail,
       'string_fromcharcodes_test': skip_timeout,
       'string_operations_with_null_test': fail,
@@ -332,11 +333,11 @@
       'symbol_reserved_word_test_12_multi': fail,
       'throw_half_surrogate_pair_test_01_multi': fail,
       'unicode_test': firefox_fail,
-      'uri_parameters_all_test': firefox_fail,
+      'uri_parameters_all_test': is.firefox('<=50') ? fail : pass,
       // TODO(rnystrom): Times out because it tests a huge number of
       // combinations of URLs (4 * 5 * 5 * 8 * 6 * 6 * 4 = 115200).
       'uri_parse_test': skip_timeout,
-      'uri_test': firefox_fail,
+      'uri_test': is.firefox('<=50') ? fail : pass,
 
       'list_insert_test': fail,
       'list_removeat_test': fail,
@@ -390,7 +391,7 @@
       // was https://github.com/dart-lang/sdk/issues/27578, needs triage
       'dom_constructors_test': 'fail',
 
-      'element_animate_test': async_unittest,
+      'element_animate_test': 'unittest',
 
       // https://github.com/dart-lang/sdk/issues/27579.
       'element_classes_test': 'fail',
@@ -443,9 +444,6 @@
       'media_stream_test': 'fail',
       'messageevent_test': 'fail',
 
-      // Should throw but does not.
-      'mirrors_js_typed_interop_test': 'fail',
-
       'mutationobserver_test': async_unittest,
       'native_gc_test': async_unittest,
 
diff --git a/pkg/dev_compiler/test/codegen/single_test.html b/pkg/dev_compiler/test/codegen/single_test.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pkg/dev_compiler/test/codegen/single_test.html
diff --git a/pkg/dev_compiler/test/codegen_test.dart b/pkg/dev_compiler/test/codegen_test.dart
index 5e5e98b..2e1d7be 100644
--- a/pkg/dev_compiler/test/codegen_test.dart
+++ b/pkg/dev_compiler/test/codegen_test.dart
@@ -156,16 +156,21 @@
         compiler = new ModuleCompiler(analyzerOptions);
       }
       JSModuleFile module = null;
+      var error, trace;
       try {
         module = compiler.compile(unit, options);
-      } catch (e) {}
+      } catch (e, t) {
+        error = e;
+        trace = t;
+      }
 
       bool notStrong = notYetStrongTests.contains(name);
       bool crashing = _crashingTests.contains(name);
 
       if (module == null) {
         expect(crashing, isTrue,
-            reason: "test $name crashes during compilation.");
+            reason: "test $name crashes during compilation.\n\n"
+                "Exception: $error\n\nStack trace:\n\n$trace");
       } else if (module.isValid) {
         _writeModule(
             path.join(codegenOutputDir, name),
diff --git a/pkg/dev_compiler/test/not_yet_strong_tests.dart b/pkg/dev_compiler/test/not_yet_strong_tests.dart
index 7cf87cc..0d67109 100644
--- a/pkg/dev_compiler/test/not_yet_strong_tests.dart
+++ b/pkg/dev_compiler/test/not_yet_strong_tests.dart
@@ -930,6 +930,7 @@
   'language/is_not_class2_test',
   'language/is_object_test',
   'language/isnot_malformed_type_test',
+  'language/issue_23914_test', // issue 28478
   'language/issue11724_test',
   'language/issue11793_test',
   'language/issue13474_test',
@@ -1200,6 +1201,7 @@
   'language/mixin_lib_extends_field_test',
   'language/mixin_lib_extends_method_test',
   'language/mixin_method_test',
+  'language/mixin_mixin_bound_test', // issue 28450
   'language/mixin_super_bound2_test_01_multi',
   'language/mixin_super_bound2_test_none_multi',
   'language/mixin_super_bound_test',
@@ -1446,6 +1448,8 @@
   'language/proxy_test_02_multi',
   'language/proxy_test_05_multi',
   'language/proxy_test_06_multi',
+  'language/recursive_generic_test', // issue 28478
+  'language/recursive_inheritance_test', // issue 28478
   'language/redirecting_constructor_initializer_test',
   'language/redirecting_factory_default_values_test_01_multi',
   'language/redirecting_factory_default_values_test_02_multi',
@@ -1479,6 +1483,7 @@
   'language/regress_22936_test_01_multi',
   'language/regress_23038_test_01_multi',
   'language/regress_23051_test_01_multi',
+  'language/regress_23089_test', // issue 28450
   'language/regress_23408_test',
   'language/return_type_test',
   'language/rewrite_implicit_this_test_01_multi',
@@ -2088,6 +2093,7 @@
   'corelib/symbol_test_none_multi',
   'corelib/uri_path_test',
   'corelib/uri_query_test',
+  'lib/collection/linked_list_test', // issue 28478
   'lib/convert/chunked_conversion1_test',
   'lib/math/min_max_test',
   'lib/typed_data/float32x4_test',
@@ -2119,6 +2125,7 @@
   'lib/mirrors/generic_class_declaration_test',
   'lib/mirrors/generic_f_bounded_mixin_application_test',
   'lib/mirrors/generic_interface_test_01_multi',
+  'lib/mirrors/generics_dynamic_test', // issue 28450
   'lib/mirrors/generics_test_01_multi',
   'lib/mirrors/get_symbol_name_no_such_method_test',
   'lib/mirrors/immutable_collections_test',
diff --git a/pkg/dev_compiler/tool/build_sdk.dart b/pkg/dev_compiler/tool/build_sdk.dart
index 99d84e7..9761f1d 100644
--- a/pkg/dev_compiler/tool/build_sdk.dart
+++ b/pkg/dev_compiler/tool/build_sdk.dart
@@ -9,6 +9,8 @@
 /// command line interface. But being able to build from a Dart library means
 /// we can call this during code coverage to get more realistic numbers.
 
+import 'dart:io';
+
 import 'package:dev_compiler/src/compiler/command.dart';
 
 main(List<String> arguments) {
@@ -51,5 +53,7 @@
     'dart:web_gl',
     'dart:web_sql'
   ]);
-  compile(args);
+
+  var result = compile(args);
+  exit(result);
 }
diff --git a/pkg/dev_compiler/tool/build_sdk.sh b/pkg/dev_compiler/tool/build_sdk.sh
index 561f5c4..bcda0af 100755
--- a/pkg/dev_compiler/tool/build_sdk.sh
+++ b/pkg/dev_compiler/tool/build_sdk.sh
@@ -9,7 +9,8 @@
 echo "*** Compiling SDK to JavaScript"
 
 # TODO(jmesserly): break out dart:html & friends.
-dart -c tool/build_sdk.dart \
+{ # Try
+  dart -c tool/build_sdk.dart \
     --dart-sdk gen/patched_sdk \
     --dart-sdk-summary=build \
     --summary-out lib/sdk/ddc_sdk.sum \
@@ -22,3 +23,8 @@
     --modules=legacy \
     -o lib/js/legacy/dart_sdk.js \
     "$@" > tool/sdk_expected_errors.txt
+} || { # Catch
+  # Show errors if the sdk didn't compile.
+  cat tool/sdk_expected_errors.txt
+  exit 1
+}
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/async/future.dart b/pkg/dev_compiler/tool/input_sdk/lib/async/future.dart
index 815f526..49b2460 100644
--- a/pkg/dev_compiler/tool/input_sdk/lib/async/future.dart
+++ b/pkg/dev_compiler/tool/input_sdk/lib/async/future.dart
@@ -4,6 +4,46 @@
 
 part of dart.async;
 
+/// A type representing values that are either `Future<T>` or `T`.
+///
+/// This class declaration is a public stand-in for an internal
+/// future-or-value generic type. References to this class are resolved to the
+/// internal type.
+///
+/// It is a compile-time error for any class to extend, mix in or implement
+/// `FutureOr`.
+///
+/// Note: the `FutureOr<T>` type is interpreted as `dynamic` in non strong-mode.
+///
+/// # Examples
+/// ``` dart
+/// // The `Future<T>.then` function takes a callback [f] that returns either
+/// // an `S` or a `Future<S>`.
+/// Future<S> then<S>(FutureOr<S> f(T x), ...);
+///
+/// // `Completer<T>.complete` takes either a `T` or `Future<T>`.
+/// void complete(FutureOr<T> value);
+/// ```
+///
+/// # Advanced
+/// The `FutureOr<int>` type is actually the "type union" of the types `int` and
+/// `Future<int>`. This type union is defined in such a way that
+/// `FutureOr<Object>` is both a super- and sub-type of `Object` (sub-type
+/// because `Object` is one of the types of the union, super-type because
+/// `Object` is a super-type of both of the types of the union). Together it
+/// means that `FutureOr<Object>` is equivalent to `Object`.
+///
+/// As a corollary, `FutureOr<Object>` is equivalent to
+/// `FutureOr<FutureOr<Object>>`, `FutureOr<Future<Object>> is equivalent to
+/// `Future<Object>`.
+abstract class FutureOr<T> {
+  // Private constructor, so that it is not subclassable, mixable, or
+  // instantiable.
+  FutureOr._() {
+    throw new UnsupportedError("FutureOr can't be instantiated");
+  }
+}
+
 /**
  * An object representing a delayed computation.
  *
@@ -225,7 +265,7 @@
     _Future<T> result = new _Future<T>();
     new Timer(duration, () {
       try {
-        result._complete(computation == null ? null : computation());
+        result._complete(computation?.call());
       } catch (e, s) {
         _completeWithErrorCallback(result, e, s);
       }
@@ -254,11 +294,11 @@
    * The call to `cleanUp` should not throw. If it does, the error will be an
    * uncaught asynchronous error.
    */
-  static Future<List/*<T>*/> wait/*<T>*/(Iterable<Future/*<T>*/> futures,
+  static Future<List<T>> wait<T>(Iterable<Future<T>> futures,
                            {bool eagerError: false,
-                            void cleanUp(/*=T*/ successValue)}) {
-    final _Future<List/*<T>*/> result = new _Future<List/*<T>*/>();
-    List/*<T>*/ values;  // Collects the values. Set to null on error.
+                            void cleanUp(T successValue)}) {
+    final _Future<List<T>> result = new _Future<List<T>>();
+    List<T> values;  // Collects the values. Set to null on error.
     int remaining = 0;  // How many futures are we waiting for.
     var error;   // The first error from a future.
     StackTrace stackTrace;  // The stackTrace that came with the error.
@@ -287,32 +327,56 @@
       }
     }
 
-    // As each future completes, put its value into the corresponding
-    // position in the list of values.
-    for (Future future in futures) {
-      int pos = remaining++;
-      future.then((Object/*=T*/ value) {
-        remaining--;
-        if (values != null) {
-          values[pos] = value;
-          if (remaining == 0) {
-            result._completeWithValue(values);
+    try {
+      // As each future completes, put its value into the corresponding
+      // position in the list of values.
+      for (Future future in futures) {
+        int pos = remaining;
+        future.then((T value) {
+          remaining--;
+          if (values != null) {
+            values[pos] = value;
+            if (remaining == 0) {
+              result._completeWithValue(values);
+            }
+          } else {
+            if (cleanUp != null && value != null) {
+              // Ensure errors from cleanUp are uncaught.
+              new Future.sync(() { cleanUp(value); });
+            }
+            if (remaining == 0 && !eagerError) {
+              result._completeError(error, stackTrace);
+            }
           }
-        } else {
-          if (cleanUp != null && value != null) {
-            // Ensure errors from cleanUp are uncaught.
-            new Future.sync(() { cleanUp(value); });
-          }
-          if (remaining == 0 && !eagerError) {
-            result._completeError(error, stackTrace);
-          }
-        }
-      }, onError: handleError);
+        }, onError: handleError);
+        // Increment the 'remaining' after the call to 'then'.
+        // If that call throws, we don't expect any future callback from
+        // the future, and we also don't increment remaining.
+        remaining++;
+      }
+      if (remaining == 0) {
+        return new Future.value(const []);
+      }
+      values = new List<T>(remaining);
+    } catch (e, st) {
+      // The error must have been thrown while iterating over the futures
+      // list, or while installing a callback handler on the future.
+      if (remaining == 0 || eagerError) {
+        // Throw a new Future.error.
+        // Don't just call `result._completeError` since that would propagate
+        // the error too eagerly, not giving the callers time to install
+        // error handlers.
+        // Also, don't use `_asyncCompleteError` since that one doesn't give
+        // zones the chance to intercept the error.
+        return new Future.error(e, st);
+      } else {
+        // Don't allocate a list for values, thus indicating that there was an
+        // error.
+        // Set error to the caught exception.
+        error = e;
+        stackTrace = st;
+      }
     }
-    if (remaining == 0) {
-      return new Future.value(const []);
-    }
-    values = new List/*<T>*/(remaining);
     return result;
   }
 
@@ -326,9 +390,9 @@
    * If [futures] is empty, or if none of its futures complete,
    * the returned future never completes.
    */
-  static Future/*<T>*/ any/*<T>*/(Iterable<Future/*<T>*/> futures) {
-    var completer = new Completer/*<T>*/.sync();
-    var onValue = (/*=T*/ value) {
+  static Future<T> any<T>(Iterable<Future<T>> futures) {
+    var completer = new Completer<T>.sync();
+    var onValue = (T value) {
       if (!completer.isCompleted) completer.complete(value);
     };
     var onError = (error, stack) {
@@ -363,18 +427,19 @@
   }
 
   /**
-   * Perform an async operation repeatedly until it returns `false`.
+   * Performs an async operation repeatedly until it returns `false`.
    *
-   * Runs [f] repeatedly, starting the next iteration only when the [Future]
-   * returned by [f] completes to `true`. Returns a [Future] that completes once
-   * [f] returns `false`.
+   * The function [f] is called repeatedly while it returns either the [bool]
+   * value `true` or a [Future] which completes with the value `true`.
    *
-   * The return values of all [Future]s are discarded. Any errors will cause the
-   * iteration to stop and will be piped through the returned [Future].
+   * If a call to [f] returns `false` or a [Future] that completes to `false`,
+   * iteration ends and the future returned by [doWhile] is completed.
    *
-   * The function [f] may return either a [bool] or a [Future] that completes to
-   * a [bool]. If it returns a non-[Future], iteration continues immediately.
-   * Otherwise it waits for the returned [Future] to complete.
+   * If a future returned by [f] completes with an error, iteration ends and
+   * the future returned by [doWhile] completes with the same error.
+   *
+   * The [f] function must return either a `bool` value or a [Future] completing
+   * with a `bool` value.
    */
   static Future doWhile(f()) {
     _Future doneSignal = new _Future();
@@ -432,7 +497,7 @@
    * with a `test` parameter, instead of handling both value and error in a
    * single [then] call.
    */
-  Future/*<S>*/ then/*<S>*/(onValue(T value), { Function onError });
+  Future<S> then<S>(FutureOr<S> onValue(T value), { Function onError });
 
   /**
    * Handles errors emitted by this [Future].
@@ -495,7 +560,7 @@
   // `isCheck` we should also expect functions that take a specific argument.
   // Note: making `catchError` return a `Future<T>` in non-strong mode could be
   // a breaking change.
-  Future/*<T>*/ catchError(Function onError,
+  Future<T> catchError(Function onError,
                            {bool test(Object error)});
 
   /**
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/async/future_impl.dart b/pkg/dev_compiler/tool/input_sdk/lib/async/future_impl.dart
index eb4d6cf..4e6ba42 100644
--- a/pkg/dev_compiler/tool/input_sdk/lib/async/future_impl.dart
+++ b/pkg/dev_compiler/tool/input_sdk/lib/async/future_impl.dart
@@ -128,14 +128,14 @@
   }
 
   dynamic/*T|Future<T>*/ handleValue(S sourceResult) {
-    return _zone.runUnary/*<dynamic/*T|Future<T>*/, S>*/(
+    return _zone.runUnary<dynamic/*T|Future<T>*/, S>(
         _onValue, sourceResult);
   }
 
   bool matchesErrorTest(AsyncError asyncError) {
     if (!hasErrorTest) return true;
     _FutureErrorTest test = _errorTest;
-    return _zone.runUnary/*<bool, dynamic>*/(_errorTest, asyncError.error);
+    return _zone.runUnary<bool, dynamic>(_errorTest, asyncError.error);
   }
 
   dynamic/*T|Future<T>*/ handleError(AsyncError asyncError) {
@@ -147,7 +147,7 @@
           asyncError.error,
           asyncError.stackTrace);
     } else {
-      return _zone.runUnary/*<dynamic/*T|Future<T>*/, dynamic>*/(
+      return _zone.runUnary<dynamic/*T|Future<T>*/, dynamic>(
           errorCallback, asyncError.error);
     }
   }
@@ -230,33 +230,33 @@
     _resultOrListeners = source;
   }
 
-  Future/*<E>*/ then/*<E>*/(
-      /*=dynamic/*E|Future<E>*/*/ f(T value), { Function onError }) {
+  Future<E> then<E>(
+      FutureOr<E> f(T value), { Function onError }) {
     Zone currentZone = Zone.current;
     ZoneUnaryCallback registered;
     if (!identical(currentZone, _ROOT_ZONE)) {
-      f = currentZone.registerUnaryCallback/*<dynamic, T>*/(f);
+      f = currentZone.registerUnaryCallback<FutureOr<E>, T>(f);
       if (onError != null) {
-        onError = _registerErrorHandler/*<T>*/(onError, currentZone);
+        onError = _registerErrorHandler<T>(onError, currentZone);
       }
     }
-    return _thenNoZoneRegistration/*<E>*/(f, onError);
+    return _thenNoZoneRegistration<E>(f, onError);
   }
 
   // This method is used by async/await.
-  Future/*<E>*/ _thenNoZoneRegistration/*<E>*/(f(T value), Function onError) {
-    _Future/*<E>*/ result = new _Future/*<E>*/();
-    _addListener(new _FutureListener/*<T, E>*/.then(result, f, onError));
+  Future<E> _thenNoZoneRegistration<E>(f(T value), Function onError) {
+    _Future<E> result = new _Future<E>();
+    _addListener(new _FutureListener<T, E>.then(result, f, onError));
     return result;
   }
 
-  Future/*<T>*/ catchError(Function onError, { bool test(error) }) {
-    _Future/*<T>*/ result = new _Future/*<T>*/();
+  Future<T> catchError(Function onError, { bool test(error) }) {
+    _Future<T> result = new _Future<T>();
     if (!identical(result._zone, _ROOT_ZONE)) {
-      onError = _registerErrorHandler/*<T>*/(onError, result._zone);
+      onError = _registerErrorHandler<T>(onError, result._zone);
       if (test != null) test = result._zone.registerUnaryCallback(test);
     }
-    _addListener(new _FutureListener/*<T, T>*/.catchError(
+    _addListener(new _FutureListener<T, T>.catchError(
         result, onError, test));
     return result;
   }
@@ -264,9 +264,9 @@
   Future<T> whenComplete(action()) {
     _Future<T> result = new _Future<T>();
     if (!identical(result._zone, _ROOT_ZONE)) {
-      action = result._zone.registerCallback/*<dynamic>*/(action);
+      action = result._zone.registerCallback<dynamic>(action);
     }
-    _addListener(new _FutureListener/*<T, T>*/.whenComplete(result, action));
+    _addListener(new _FutureListener<T, T>.whenComplete(result, action));
     return result;
   }
 
@@ -277,6 +277,11 @@
     _state = _PENDING_COMPLETE;
   }
 
+  void _clearPendingComplete() {
+    assert(_isPendingComplete);
+    _state = _INCOMPLETE;
+  }
+
   AsyncError get _error {
     assert(_hasError);
     return _resultOrListeners;
@@ -405,7 +410,11 @@
     try {
       source.then((value) {
           assert(target._isPendingComplete);
-          target._completeWithValue(value);
+          // The "value" may be another future if the foreign future
+          // implementation is mis-behaving,
+          // so use _complete instead of _completeWithValue.
+          target._clearPendingComplete();  // Clear this first, it's set again.
+          target._complete(value);
         },
         // TODO(floitsch): eventually we would like to make this non-optional
         // and dependent on the listeners of the target future. If none of
@@ -650,7 +659,7 @@
           }
         }
 
- 
+
         if (listener.handlesComplete) {
           handleWhenCompleteCallback();
         } else if (!hasError) {
@@ -662,7 +671,7 @@
             handleError();
           }
         }
-        
+
         // If we changed zone, oldZone will not be null.
         if (oldZone != null) Zone._leave(oldZone);
 
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/core/annotations.dart b/pkg/dev_compiler/tool/input_sdk/lib/core/annotations.dart
index 6a596c6..77211ab 100644
--- a/pkg/dev_compiler/tool/input_sdk/lib/core/annotations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/lib/core/annotations.dart
@@ -137,7 +137,7 @@
  * so assigning it to a typed variable may fail in checked mode,
  * and testing it with the `is` operator
  * will only return true for types it actually implements or extends.
- * Accessing a member which isn't implemented by the classs
+ * Accessing a member which isn't implemented by the class
  * will cause the `noSuchMethod` method to be called normally,
  * the `@proxy` annotation merely states the intent to handle (some of) those
  * `noSuchMethod` calls gracefully.
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
index 629db38..026eb9a 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
@@ -53,6 +53,27 @@
         $copyProperties(s, m[$_methodSig]);
       }
       return s;
+    },
+    fields: () => {
+      let s = {};
+      for (let m of $mixins) {
+        $copyProperties(s, m[$_fieldSig]);
+      }
+      return s;
+    },
+    getters: () => {
+      let s = {};
+      for (let m of $mixins) {
+        $copyProperties(s, m[$_getterSig]);
+      }
+      return s;
+    },
+    setters: () => {
+      let s = {};
+      for (let m of $mixins) {
+        $copyProperties(s, m[$_setterSig]);
+      }
+      return s;
     }
   });
 
@@ -64,12 +85,14 @@
 /// The Symbol for storing type arguments on a specialized generic type.
 final _mixins = JS('', 'Symbol("mixins")');
 
-getMixins(clazz) => JS('', 'Object.hasOwnProperty.call(#, #) ? #[#] : null', clazz, _mixins, clazz, _mixins);
+getMixins(clazz) => JS('', 'Object.hasOwnProperty.call(#, #) ? #[#] : null',
+    clazz, _mixins, clazz, _mixins);
 
 @JSExportName('implements')
 final _implements = JS('', 'Symbol("implements")');
 
-getImplements(clazz) => JS('', 'Object.hasOwnProperty.call(#, #) ? #[#] : null', clazz, _implements, clazz, _implements);
+getImplements(clazz) => JS('', 'Object.hasOwnProperty.call(#, #) ? #[#] : null',
+    clazz, _implements, clazz, _implements);
 
 /// The Symbol for storing type arguments on a specialized generic type.
 final _typeArguments = JS('', 'Symbol("typeArguments")');
@@ -151,12 +174,12 @@
 final _constructorSig = JS('', 'Symbol("sigCtor")');
 final _methodSig = JS('', 'Symbol("sigMethod")');
 final _fieldSig = JS('', 'Symbol("sigField")');
-final _getterSig= JS('', 'Symbol("sigGetter")');
-final _setterSig= JS('', 'Symbol("sigSetter")');
+final _getterSig = JS('', 'Symbol("sigGetter")');
+final _setterSig = JS('', 'Symbol("sigSetter")');
 final _staticSig = JS('', 'Symbol("sigStaticMethod")');
 final _staticFieldSig = JS('', 'Symbol("sigStaticField")');
-final _staticGetterSig= JS('', 'Symbol("sigStaticGetter")');
-final _staticSetterSig= JS('', 'Symbol("sigStaticSetter")');
+final _staticGetterSig = JS('', 'Symbol("sigStaticGetter")');
+final _staticSetterSig = JS('', 'Symbol("sigStaticSetter")');
 final _genericTypeCtor = JS('', 'Symbol("genericType")');
 
 // TODO(vsm): Collapse this as well - just provide a dart map to mirrors code.
@@ -174,15 +197,14 @@
 getGenericTypeCtor(value) => JS('', '#[#]', value, _genericTypeCtor);
 
 /// Get the type of a method from an object using the stored signature
-getMethodType(obj, name) => JS(
+getType(obj) => JS(
     '',
     '''(() => {
-  let type = $obj == null ? $Object : $obj.__proto__.constructor;
-  return $getMethodTypeFromType(type, $name);
+  return $obj == null ? $Object : $obj.__proto__.constructor;
 })()''');
 
 /// Get the type of a method from a type using the stored signature
-getMethodTypeFromType(type, name) => JS(
+getMethodType(type, name) => JS(
     '',
     '''(() => {
   let sigObj = $type[$_methodSig];
@@ -190,6 +212,22 @@
   return sigObj[$name];
 })()''');
 
+getFieldType(type, name) => JS(
+    '',
+    '''(() => {
+  let sigObj = $type[$_fieldSig];
+  if (sigObj === void 0) return void 0;
+  return sigObj[$name];
+})()''');
+
+getSetterType(type, name) => JS(
+    '',
+    '''(() => {
+  let sigObj = $type[$_setterSig];
+  if (sigObj === void 0) return void 0;
+  return sigObj[$name];
+})()''');
+
 /// Get the type of a constructor from a class using the stored signature
 /// If name is undefined, returns the type of the default constructor
 /// Returns undefined if the constructor is not found.
@@ -219,7 +257,7 @@
   $f = $f.bind($obj);
   // TODO(jmesserly): track the function's signature on the function, instead
   // of having to go back to the class?
-  let sig = $getMethodType($obj, $name);
+  let sig = $getMethodType($getType($obj), $name);
   $assert_(sig);
   $tag($f, sig);
   return $f;
@@ -242,7 +280,9 @@
     '''(() => {
   $defineMemoizedGetter($f, $kind, () => {
     let sigObj = $sigF();
-    sigObj.__proto__ = $f.__proto__[$kind];
+    let proto = $f.__proto__;
+    // We need to set the root proto to null not undefined.
+    sigObj.__proto__ = ($kind in proto) ? proto[$kind] : null;
     return sigObj;
   });
 })()''');
@@ -330,7 +370,18 @@
   $_setStaticTypes($f, names);
 })()''');
 
-hasMethod(obj, name) => JS('', '$getMethodType($obj, $name) !== void 0');
+_hasSigEntry(type, sigF, name) => JS(
+    '',
+    '''(() => {
+  let sigObj = $type[$sigF];
+  if (sigObj === void 0) return false;
+  return $name in sigObj;
+})()''');
+
+hasMethod(type, name) => _hasSigEntry(type, _methodSig, name);
+hasGetter(type, name) => _hasSigEntry(type, _getterSig, name);
+hasSetter(type, name) => _hasSigEntry(type, _setterSig, name);
+hasField(type, name) => _hasSigEntry(type, _fieldSig, name);
 
 /// Given a class and an initializer method name, creates a constructor
 /// function with the same name.
@@ -431,9 +482,15 @@
   // Mark the JS type's instances so we can easily check for extensions.
   jsProto[$_extensionType] = $dartExtType;
   $_installProperties(jsProto, extProto);
-  let originalSigFn = $getOwnPropertyDescriptor($dartExtType, $_methodSig).get;
-  $assert_(originalSigFn);
-  $defineMemoizedGetter($jsType, $_methodSig, originalSigFn);
+  function updateSig(sigF) {
+    let originalSigFn = $getOwnPropertyDescriptor($dartExtType, sigF).get;
+    $assert_(originalSigFn);
+    $defineMemoizedGetter($jsType, sigF, originalSigFn);
+  }
+  updateSig($_methodSig);
+  updateSig($_fieldSig);
+  updateSig($_getterSig);
+  updateSig($_setterSig);
 })()''');
 
 ///
@@ -469,14 +526,24 @@
   // annotations) any time we copy a method as part of our metaprogramming.
   // It might be more friendly to JS metaprogramming if we include this info
   // on the function.
-  let originalSigFn = $getOwnPropertyDescriptor($type, $_methodSig).get;
-  $defineMemoizedGetter(type, $_methodSig, function() {
-    let sig = originalSigFn();
-    for (let name of $methodNames) {
-      sig[$getExtensionSymbol(name)] = sig[name];
-    }
-    return sig;
-  });
+
+  function upgradeSig(sigF) {
+    let originalSigFn = $getOwnPropertyDescriptor($type, sigF).get;
+    $defineMemoizedGetter(type, sigF, function() {
+      let sig = originalSigFn();
+      let propertyNames = Object.getOwnPropertyNames(sig);
+      for (let name of methodNames) {
+        if (name in sig) {
+          sig[$getExtensionSymbol(name)] = sig[name];
+        }
+      }
+      return sig;
+    });
+  };
+  upgradeSig($_methodSig);
+  upgradeSig($_fieldSig);
+  upgradeSig($_getterSig);
+  upgradeSig($_setterSig);
 })()''');
 
 /// Sets the type of `obj` to be `type`
@@ -499,7 +566,9 @@
 /// Like [setBaseClass] but for generic extension types, e.g. `JSArray<E>`
 setExtensionBaseClass(derived, base) {
   // Mark the generic type as an extension type and link the prototype objects
-  return JS('', '''(() => {
+  return JS(
+      '',
+      '''(() => {
     if ($base) {
       $derived.prototype[$_extensionType] = $derived;
       $derived.prototype.__proto__ = $base.prototype
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart
index a88138b..090ec26 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart
@@ -47,7 +47,7 @@
     // Chain the Future so `await` receives the Future's value.
     return future.then($dynamic)(onValue, {onError: onError});
   }
-  return ${getGenericClass(Future)}($T).new(function() {
+  return ${getGenericClass(Future)}($T).microtask(function() {
     iter = $gen.apply(null, $args)[Symbol.iterator]();
     return onValue();
   });
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 d936333..5975ddc 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
@@ -14,7 +14,7 @@
   final bool isGetter;
   final bool isSetter;
 
-  InvocationImpl(String memberName, this.positionalArguments,
+  InvocationImpl(memberName, this.positionalArguments,
       {namedArguments,
       this.isMethod: false,
       this.isGetter: false,
@@ -29,12 +29,18 @@
   }
 }
 
+// Warning: dload, dput, and dsend assume they are never called on methods
+// implemented by the Object base class as those methods can always be
+// statically resolved.
 dload(obj, field) {
   var f = _canonicalMember(obj, field);
+
   _trackCall(obj);
   if (f != null) {
-    if (hasMethod(obj, f)) return bind(obj, f, JS('', 'void 0'));
-    return JS('', '#[#]', obj, f);
+    var type = getType(obj);
+
+    if (hasField(type, f) || hasGetter(type, f)) return JS('', '#[#]', obj, f);
+    if (hasMethod(type, f)) return bind(obj, f, JS('', 'void 0'));
   }
   return noSuchMethod(
       obj, new InvocationImpl(field, JS('', '[]'), isGetter: true));
@@ -44,7 +50,26 @@
   var f = _canonicalMember(obj, field);
   _trackCall(obj);
   if (f != null) {
-    return JS('', '#[#] = #', obj, f, value);
+    var objType = getType(obj);
+    var setterType = getSetterType(objType, f);
+    if (JS('bool', '# != void 0', setterType)) {
+      // TODO(jacobr): throw a type error instead of a NoSuchMethodError if
+      // the type of the setter doesn't match.
+      if (instanceOfOrNull(value, JS('', '#.args[0]', setterType))) {
+        return JS('', '#[#] = #', obj, f, value);
+      }
+    } else {
+      var fieldType = getFieldType(objType, f);
+      // TODO(jacobr): add metadata tracking which fields are final and throw
+      // if a setter is called on a final field.
+      if (JS('bool', '# != void 0', fieldType)) {
+        // TODO(jacobr): throw a type error instead of a NoSuchMethodError if
+        // the type of the field doesn't match.
+        if (instanceOfOrNull(value, fieldType)) {
+          return JS('', '#[#] = #', obj, f, value);
+        }
+      }
+    }
   }
   return noSuchMethod(
       obj, new InvocationImpl(field, JS('', '[#]', value), isSetter: true));
@@ -89,8 +114,42 @@
   return true;
 })()''');
 
-Symbol _dartSymbol(name) =>
-    JS('', '#(#.new(#.toString()))', const_, Symbol, name);
+_toSymbolName(symbol) => JS(
+    '',
+    '''(() => {
+        let str = $symbol.toString();
+        // Strip leading 'Symbol(' and trailing ')'
+        return str.substring(7, str.length-1);
+    })()''');
+
+_toDisplayName(name) => JS(
+    '',
+    '''(() => {
+      // Names starting with _ are escaped names used to disambiguate Dart and
+      // JS names.
+      if ($name[0] === '_') {
+        // Inverse of 
+        switch($name) {
+          case '_get':
+            return '[]';
+          case '_set':
+            return '[]=';
+          case '_negate':
+            return 'unary-';
+          case '_constructor':
+          case '_prototype':
+            return $name.substring(1);
+        }
+      }
+      return $name;
+  })()''');
+
+Symbol _dartSymbol(name) {
+  return (JS('bool', 'typeof # === "symbol"', name))
+      ? JS('', '#(new #.es6(#, #))', const_, _internal.Symbol,
+          _toSymbolName(name), name)
+      : JS('', '#(#.new(#))', const_, Symbol, _toDisplayName(name));
+}
 
 /// Extracts the named argument array from a list of arguments, and returns it.
 // TODO(jmesserly): we need to handle named arguments better.
@@ -121,7 +180,7 @@
     // We're not a function (and hence not a method either)
     // Grab the `call` method if it's not a function.
     if ($f != null) {
-      $ftype = $getMethodType($f, 'call');
+      $ftype = $getMethodType($getType($f), 'call');
       $f = $f.call;
     }
     if (!($f instanceof Function)) {
@@ -303,7 +362,9 @@
         obj, new InvocationImpl(displayName, args, isMethod: true));
   }
   var f = obj != null ? JS('', '#[#]', obj, symbol) : null;
-  var ftype = getMethodType(obj, symbol);
+  var type = getType(obj);
+  var ftype = getMethodType(type, symbol);
+  // No such method if dart object and ftype is missing.
   return _checkAndCall(f, ftype, obj, typeArgs, args, displayName);
 }
 
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 b23aa63..fb47401 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
@@ -21,6 +21,7 @@
         StrongModeErrorImplementation,
         StrongModeTypeError,
         SyncIterable;
+import 'dart:_internal' as _internal;
 
 part 'classes.dart';
 part 'rtti.dart';
@@ -30,6 +31,59 @@
 part 'operations.dart';
 part 'utils.dart';
 
+// TODO(vsm): Move polyfill code to dart:html.
+// Note, native extensions are registered onto types in dart.global.
+// This polyfill needs to run before the corresponding dart:html code is run.
 @JSExportName('global')
-final global_ = JS('', 'typeof window == "undefined" ? global : window');
+final global_ = JS('', '''
+  function () {
+    if (typeof NodeList !== "undefined") {
+      // TODO(vsm): Do we still need these?
+      NodeList.prototype.get = function(i) { return this[i]; };
+      NamedNodeMap.prototype.get = function(i) { return this[i]; };
+      DOMTokenList.prototype.get = function(i) { return this[i]; };
+      HTMLCollection.prototype.get = function(i) { return this[i]; };
+
+      // Expose constructors for DOM types dart:html needs to assume are
+      // available on window.
+      if (typeof PannerNode == "undefined") {
+        let audioContext;
+        if (typeof AudioContext == "undefined" &&
+            (typeof webkitAudioContext != "undefined")) {
+          audioContext = new webkitAudioContext();
+        } else {
+          audioContext = new AudioContext();
+          window.StereoPannerNode =
+              audioContext.createStereoPanner().constructor;
+        }
+        window.PannerNode = audioContext.createPanner().constructor;
+      }
+      if (typeof AudioSourceNode == "undefined") {
+        window.AudioSourceNode = MediaElementAudioSourceNode.__proto__;
+      }
+      if (typeof FontFaceSet == "undefined") {
+        window.FontFaceSet = document.fonts.__proto__.constructor;
+      }
+      if (typeof MemoryInfo == "undefined") {
+        if (typeof window.performance.memory != "undefined") {
+          window.MemoryInfo = window.performance.memory.constructor;
+        }
+      }
+      if (typeof Geolocation == "undefined") {
+        navigator.geolocation.constructor;
+      }
+      if (typeof Animation == "undefined") {
+        let d = document.createElement('div');
+        if (typeof d.animate != "undefined") {
+          window.Animation = d.animate(d).constructor;
+        }
+      }
+      if (typeof SourceBufferList == "undefined") {
+        window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
+      }
+    }
+    return typeof window == "undefined" ? global : window;
+  }()
+''');
+
 final JsSymbol = JS('', 'Symbol');
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 4d402db..abc476d 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
@@ -182,56 +182,61 @@
   toString() => typeName(_wrappedType);
 }
 
-final AbstractFunctionType = JS(
-    '',
-    '''
-  class AbstractFunctionType extends $TypeRep {
-    constructor() {
-      super();
-      this._stringValue = null;
+abstract class AbstractFunctionType extends TypeRep {
+  String _stringValue = null;
+  get args;
+  get optionals;
+  get metadata;
+  get named;
+  get returnType;
+
+  AbstractFunctionType() {}
+
+  toString() {
+    return name;
+  }
+
+  get name {
+    if (_stringValue != null) return _stringValue;
+
+    var buffer = '(';
+    for (var i = 0; JS('bool', '# < #.length', i, args); ++i) {
+      if (i > 0) {
+        buffer += ', ';
+      }
+      buffer += typeName(JS('', '#[#]', args, i));
     }
-
-    toString() { return this.name; }
-
-    get name() {
-      if (this._stringValue) return this._stringValue;
-
-      let buffer = '(';
-      for (let i = 0; i < this.args.length; ++i) {
+    if (JS('bool', '#.length > 0', optionals)) {
+      if (JS('bool', '#.length > 0', args)) buffer += ', ';
+      buffer += '[';
+      for (var i = 0; JS('bool', '# < #.length', i, optionals); ++i) {
         if (i > 0) {
           buffer += ', ';
         }
-        buffer += $typeName(this.args[i]);
+        buffer += typeName(JS('', '#[#]', optionals, i));
       }
-      if (this.optionals.length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '[';
-        for (let i = 0; i < this.optionals.length; ++i) {
-          if (i > 0) {
-            buffer += ', ';
-          }
-          buffer += $typeName(this.optionals[i]);
+      buffer += ']';
+    } else if (JS('bool', 'Object.keys(#).length > 0', named)) {
+      if (JS('bool', '#.length > 0', args)) buffer += ', ';
+      buffer += '{';
+      var names = getOwnPropertyNames(named);
+      JS('', '#.sort()', names);
+      for (var i = 0; JS('', '# < #.length', i, names); ++i) {
+        if (i > 0) {
+          buffer += ', ';
         }
-        buffer += ']';
-      } else if (Object.keys(this.named).length > 0) {
-        if (this.args.length > 0) buffer += ', ';
-        buffer += '{';
-        let names = $getOwnPropertyNames(this.named).sort();
-        for (let i = 0; i < names.length; ++i) {
-          if (i > 0) {
-            buffer += ', ';
-          }
-          buffer += names[i] + ': ' + $typeName(this.named[names[i]]);
-        }
-        buffer += '}';
+        var typeNameString = typeName(JS('', '#[#[#]]', named, names, i));
+        buffer += '${JS('', '#[#]', names, i)}: $typeNameString';
       }
-
-      buffer += ') -> ' + $typeName(this.returnType);
-      this._stringValue = buffer;
-      return buffer;
+      buffer += '}';
     }
+
+    var returnTypeName = typeName(returnType);
+    buffer += ') -> $returnTypeName';
+    _stringValue = buffer;
+    return buffer;
   }
-''');
+}
 
 /// Memo table for named argument groups. A named argument packet
 /// {name1 : type1, ..., namen : typen} corresponds to the path
@@ -260,207 +265,215 @@
 /// of required arguments yields a map which is indexed by the
 /// argument types themselves.  The element reached via this
 /// index path (if present) is the canonical function type.
-final _fnTypeSmallMap = JS('', '[new Map(), new Map(), new Map()]');
+final List _fnTypeSmallMap = JS('', '[new Map(), new Map(), new Map()]');
 
-final FunctionType = JS(
+_memoizeArray(map, arr, create) => JS(
     '',
-    '''
-  class FunctionType extends $AbstractFunctionType {
-    static _memoizeArray(map, arr, create) {
-      let len = arr.length;
-      map = FunctionType._lookupNonTerminal(map, len);
-      for (var i = 0; i < len-1; ++i) {
-        map = FunctionType._lookupNonTerminal(map, arr[i]);
-      }
-      let result = map.get(arr[len-1]);
-      if (result !== void 0) return result;
-      map.set(arr[len-1], result = create());
-      return result;
-    }
+    '''(() => {
+  let len = $arr.length;
+  $map = $_lookupNonTerminal($map, len);
+  for (var i = 0; i < len-1; ++i) {
+    $map = $_lookupNonTerminal($map, $arr[i]);
+  }
+  let result = $map.get($arr[len-1]);
+  if (result !== void 0) return result;
+  $map.set($arr[len-1], result = $create());
+  return result;
+})()''');
 
-    // Map dynamic to bottom. If meta-data is present,
-    // we slice off the remaining meta-data and make
-    // it the second element of a packet for processing
-    // later on in the constructor.
-    static _normalizeParameter(a) {
-      if (a instanceof Array) {
-        let result = [];
-        result.push((a[0] == $dynamic) ? $bottom : a[0]);
-        result.push(a.slice(1));
-        return result;
-      }
-      return (a == $dynamic) ? $bottom : a;
-    }
+// Map dynamic to bottom. If meta-data is present,
+// we slice off the remaining meta-data and make
+// it the second element of a packet for processing
+// later on in the constructor.
+_normalizeParameter(a) => JS(
+    '',
+    '''(() => {
+  if ($a instanceof Array) {
+    let result = [];
+    result.push(($a[0] == $dynamic) ? $bottom : $a[0]);
+    result.push($a.slice(1));
+    return result;
+  }
+  return ($a == $dynamic) ? $bottom : $a;
+})()''');
 
-    static _canonicalizeArray(definite, array, map) {
-      let arr = (definite)
-         ? array
-         : array.map(FunctionType._normalizeParameter);
-      return FunctionType._memoizeArray(map, arr, () => arr);
-    }
+_canonicalizeArray(definite, array, map) => JS(
+    '',
+    '''(() => {
+  let arr = ($definite)
+     ? $array
+     : $array.map($_normalizeParameter);
+  return $_memoizeArray($map, arr, () => arr);
+})()''');
 
-    // TODO(leafp): This only canonicalizes of the names are
-    // emitted in a consistent order.
-    static _canonicalizeNamed(definite, named, map) {
-      let key = [];
-      let names = $getOwnPropertyNames(named);
-      let r = {};
-      for (var i = 0; i < names.length; ++i) {
-        let name = names[i];
-        let type = named[name];
-        if (!definite) r[name] = type = FunctionType._normalizeParameter(type);
-        key.push(name);
-        key.push(type);
-      }
-      if (!definite) named = r;
-      return FunctionType._memoizeArray(map, key, () => named);
-    }
+// TODO(leafp): This only canonicalizes of the names are
+// emitted in a consistent order.
+_canonicalizeNamed(definite, named, map) => JS(
+    '',
+    '''(() => {
+  let key = [];
+  let names = $getOwnPropertyNames($named);
+  let r = {};
+  for (var i = 0; i < names.length; ++i) {
+    let name = names[i];
+    let type = $named[name];
+    if (!definite) r[name] = type = $_normalizeParameter(type);
+    key.push(name);
+    key.push(type);
+  }
+  if (!$definite) $named = r;
+  return $_memoizeArray($map, key, () => $named);
+})()''');
 
-    static _lookupNonTerminal(map, key) {
-      let result = map.get(key);
-      if (result !== void 0) return result;
-      map.set(key, result = new Map());
-      return result;
-    }
+_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.
-    static _createSmall(count, definite, returnType, required) {
-      let map = $_fnTypeSmallMap[count];
-      let args = (definite) ? required
-        : required.map(FunctionType._normalizeParameter);
-      for (var i = 0; i < count; ++i) {
-        map = FunctionType._lookupNonTerminal(map, args[i]);
-     }
-     let result = map.get(returnType);
-     if (result !== void 0) return result;
-     result = new FunctionType(returnType, args, [], {});
-     map.set(returnType, result);
-     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.
+_createSmall(count, definite, returnType, required) => JS(
+    '',
+    '''(() => {
+  let map = $_fnTypeSmallMap[$count];
+  let args = ($definite) ? $required
+    : $required.map($_normalizeParameter);
+  for (var i = 0; i < $count; ++i) {
+    map = $_lookupNonTerminal(map, args[i]);
+ }
+ let result = map.get($returnType);
+ if (result !== void 0) return result;
+ result = new $FunctionType($returnType, args, [], {});
+ map.set($returnType, result);
+ return result;
+})()''');
+
+class FunctionType extends AbstractFunctionType {
+  final returnType;
+  dynamic args;
+  dynamic optionals;
+  final named;
+  dynamic metadata;
+
+  /**
+   * Construct a function type. There are two arrow constructors,
+   * distinguished by the "definite" flag.
+   *
+   * The fuzzy arrow (definite is false) treats any arguments
+   * of type dynamic as having type bottom, and will always be
+   * called with a dynamic invoke.
+   *
+   * The definite arrow (definite is true) leaves arguments unchanged.
+   *
+   * We eagerly normalize the argument types to avoid having to deal with
+   * this logic in multiple places.
+   *
+   * This code does best effort canonicalization.  It does not guarantee
+   * that all instances will share.
+   *
+   */
+  static create(definite, returnType, args, extra) {
+    // Note that if extra is ever passed as an empty array
+    // or an empty map, we can end up with semantically
+    // identical function types that don't canonicalize
+    // to the same object since we won't fall into this
+    // fast path.
+    if (JS('bool', '# === void 0', extra) && JS('', '#.length < 3', args)) {
+      return _createSmall(JS('', '#.length', args), definite, returnType, args);
     }
-    /**
-     * Construct a function type. There are two arrow constructors,
-     * distinguished by the "definite" flag.
-     *
-     * The fuzzy arrow (definite is false) treats any arguments
-     * of type dynamic as having type bottom, and will always be
-     * called with a dynamic invoke.
-     *
-     * The definite arrow (definite is true) leaves arguments unchanged.
-     *
-     * We eagerly normalize the argument types to avoid having to deal with
-     * this logic in multiple places.
-     *
-     * This code does best effort canonicalization.  It does not guarantee
-     * that all instances will share.
-     *
-     */
-    static create(definite, returnType, args, extra) {
-      // Note that if extra is ever passed as an empty array
-      // or an empty map, we can end up with semantically
-      // identical function types that don't canonicalize
-      // to the same object since we won't fall into this
-      // fast path.
-      if (extra === void 0 && args.length < 3) {
-        return FunctionType._createSmall(
-          args.length, definite, returnType, args);
-      }
-      args = FunctionType._canonicalizeArray(
-        definite, args, $_fnTypeArrayArgMap);
-      let keys;
-      let create;
-      if (extra === void 0) {
-        keys = [returnType, args];
-        create = () => new FunctionType(returnType, args, [], {});
-      } else if (extra instanceof Array) {
-        let optionals =
-          FunctionType._canonicalizeArray(definite, extra, $_fnTypeArrayArgMap);
-        keys = [returnType, args, optionals];
-        create =
-          () => new FunctionType(returnType, args, optionals, {});
+    args = _canonicalizeArray(definite, args, _fnTypeArrayArgMap);
+    var keys;
+    var create;
+    if (JS('bool', '# === void 0', extra)) {
+      keys = [returnType, args];
+      create = () => new FunctionType(returnType, args, [], JS('', '{}'));
+    } else if (JS('bool', '# instanceof Array', extra)) {
+      var optionals = _canonicalizeArray(definite, extra, _fnTypeArrayArgMap);
+      keys = [returnType, args, optionals];
+      create =
+          () => new FunctionType(returnType, args, optionals, JS('', '{}'));
+    } else {
+      var named = _canonicalizeNamed(definite, extra, _fnTypeNamedArgMap);
+      keys = [returnType, args, named];
+      create = () => new FunctionType(returnType, args, [], named);
+    }
+    return _memoizeArray(_fnTypeTypeMap, keys, create);
+  }
+
+  _process(array, metadata) {
+    var result = [];
+    for (var i = 0; JS('bool', '# < #.length', i, array); ++i) {
+      var arg = JS('', '#[#]', array, i);
+      if (JS('bool', '# instanceof Array', arg)) {
+        metadata.add(JS('', '#.slice(1)', arg));
+        result.add(JS('', '#[0]', arg));
       } else {
-        let named =
-          FunctionType._canonicalizeNamed(definite, extra, $_fnTypeNamedArgMap);
-        keys = [returnType, args, named];
-        create = () => new FunctionType(returnType, args, [], named);
+        JS('', '#.push([])', metadata);
+        JS('', '#.push(#)', result, arg);
       }
-      return FunctionType._memoizeArray($_fnTypeTypeMap, keys, create);
     }
-
-    constructor(returnType, args, optionals, named) {
-      super();
-      this.returnType = returnType;
-      this.args = args;
-      this.optionals = optionals;
-      this.named = named;
-
-      // TODO(vsm): This is just parameter metadata for now.
-      this.metadata = [];
-      function process(array, metadata) {
-        var result = [];
-        for (var i = 0; i < array.length; ++i) {
-          var arg = array[i];
-          if (arg instanceof Array) {
-            metadata.push(arg.slice(1));
-            result.push(arg[0]);
-          } else {
-            metadata.push([]);
-            result.push(arg);
-          }
-        }
-        return result;
-      }
-      this.args = process(this.args, this.metadata);
-      this.optionals = process(this.optionals, this.metadata);
-      // TODO(vsm): Add named arguments.
-    }
+    return result;
   }
-''');
 
-final Typedef = JS(
-    '',
-    '''
-  class Typedef extends $AbstractFunctionType {
-    constructor(name, closure) {
-      super();
-      this._name = name;
-      this._closure = closure;
-      this._functionType = null;
-    }
-
-    get name() {
-      return this._name;
-    }
-
-    get functionType() {
-      if (!this._functionType) {
-        this._functionType = this._closure();
-      }
-      return this._functionType;
-    }
-
-    get returnType() {
-      return this.functionType.returnType;
-    }
-
-    get args() {
-      return this.functionType.args;
-    }
-
-    get optionals() {
-      return this.functionType.optionals;
-    }
-
-    get named() {
-      return this.functionType.named;
-    }
-
-    get metadata() {
-      return this.functionType.metadata;
-    }
+  FunctionType(this.returnType, this.args, this.optionals, this.named) {
+    // TODO(vsm): This is just parameter metadata for now.
+    metadata = [];
+    this.args = _process(this.args, metadata);
+    this.optionals = _process(this.optionals, metadata);
+    // TODO(vsm): Add named arguments.
   }
-''');
+}
+
+// TODO(jacobr): we can't define this typedef due to execution order issues.
+//typedef AbstractFunctionType FunctionTypeClosure();
+
+class Typedef extends AbstractFunctionType {
+  dynamic _name;
+  dynamic /*FunctionTypeClosure*/ _closure;
+  AbstractFunctionType _functionType;
+
+  Typedef(this._name, this._closure) {}
+
+  get name {
+    return _name;
+  }
+
+  AbstractFunctionType get functionType {
+    if (_functionType == null) {
+      _functionType = JS('', '#()', _closure);
+    }
+    return _functionType;
+  }
+
+  get returnType {
+    return functionType.returnType;
+  }
+
+  List get args {
+    return functionType.args;
+  }
+
+  List get optionals {
+    return functionType.optionals;
+  }
+
+  get named {
+    return functionType.named;
+  }
+
+  List get metadata {
+    return functionType.metadata;
+  }
+}
+
+typedef(name, /*FunctionTypeClosure*/ closure) {
+  return new Typedef(name, closure);
+}
 
 final _typeFormalCount = JS('', 'Symbol("_typeFormalCount")');
 
@@ -500,9 +513,7 @@
 definiteFunctionType(returnType, args, extra) =>
     _functionType(true, returnType, args, extra);
 
-typedef(name, closure) => JS('', 'new #(#, #)', Typedef, name, closure);
-
-typeName(type) => JS(
+String typeName(type) => JS(
     '',
     '''(() => {
   if ($type === void 0) return "undefined type";
@@ -554,28 +565,28 @@
 /// for a class type.
 getImplicitFunctionType(type) {
   if (isFunctionType(type)) return type;
-  return getMethodTypeFromType(type, 'call');
+  return getMethodType(type, 'call');
 }
 
 bool isFunctionType(type) => JS('bool', '# instanceof # || # === #', type,
     AbstractFunctionType, type, Function);
 
-isLazyJSSubtype(LazyJSType t1, LazyJSType t2, covariant) {
+isLazyJSSubtype(LazyJSType t1, LazyJSType t2, isCovariant) {
   if (t1 == t2) return true;
 
   // All anonymous JS types are subtypes of each other.
   if (t1._jsTypeCallback == null || t2._jsTypeCallback == null) return true;
-  return isClassSubType(t1._rawJSType, t2._rawJSType, covariant);
+  return isClassSubType(t1._rawJSType, t2._rawJSType, isCovariant);
 }
 
 /// Returns true if [ft1] <: [ft2].
 /// Returns false if [ft1] </: [ft2] in both spec and strong mode
 /// Returns null if [ft1] </: [ft2] in strong mode, but spec mode
 /// may differ
-/// If [covariant] is true, then we are checking subtyping in a covariant
+/// If [isCovariant] is true, then we are checking subtyping in a covariant
 /// position, and hence the direction of the check for function types
 /// corresponds to the direction of the check according to the Dart spec.
-isFunctionSubtype(ft1, ft2, covariant) => JS(
+isFunctionSubtype(ft1, ft2, isCovariant) => JS(
     '',
     '''(() => {
   if ($ft2 === $Function) {
@@ -595,11 +606,11 @@
   if (args1.length > args2.length) {
     // If we're in a covariant position, then Dart's arity rules
     // agree with strong mode, otherwise we can't be sure.
-    return ($covariant) ? false : null;
+    return ($isCovariant) ? false : null;
   }
 
   for (let i = 0; i < args1.length; ++i) {
-    if (!$_isSubtype(args2[i], args1[i], !$covariant)) {
+    if (!$_isSubtype(args2[i], args1[i], !$isCovariant)) {
       // Even if isSubtype returns false, assignability
       // means that we can't be definitive
       return null;
@@ -610,18 +621,18 @@
   let optionals2 = $ft2.optionals;
 
   if (args1.length + optionals1.length < args2.length + optionals2.length) {
-    return ($covariant) ? false : null;
+    return ($isCovariant) ? false : null;
   }
 
   let j = 0;
   for (let i = args1.length; i < args2.length; ++i, ++j) {
-    if (!$_isSubtype(args2[i], optionals1[j], !$covariant)) {
+    if (!$_isSubtype(args2[i], optionals1[j], !$isCovariant)) {
       return null;
     }
   }
 
   for (let i = 0; i < optionals2.length; ++i, ++j) {
-    if (!$_isSubtype(optionals2[i], optionals1[j], !$covariant)) {
+    if (!$_isSubtype(optionals2[i], optionals1[j], !$isCovariant)) {
       return null;
     }
   }
@@ -635,9 +646,9 @@
     let n1 = named1[name];
     let n2 = named2[name];
     if (n1 === void 0) {
-      return ($covariant) ? false : null;
+      return ($isCovariant) ? false : null;
     }
-    if (!$_isSubtype(n2, n1, !$covariant)) {
+    if (!$_isSubtype(n2, n1, !$isCovariant)) {
       return null;
     }
   }
@@ -649,8 +660,12 @@
   if (ret2 === $_void) return true;
   // Dart allows void functions to subtype dynamic functions, but not
   // other functions.
-  if (ret1 === $_void) return (ret2 === $dynamic);
-  if (!$_isSubtype(ret1, ret2, $covariant)) return null;
+  // TODO(jmesserly): this check does not match our compile time subtype
+  // implementation. Reconcile.
+  if (ret1 === $_void) {
+    return ret2 === $dynamic || ret2 === $FutureOr;
+  }
+  if (!$_isSubtype(ret1, ret2, $isCovariant)) return null;
   return true;
 })()''');
 
@@ -685,9 +700,14 @@
 
 _isBottom(type) => JS('bool', '# == #', type, bottom);
 
-_isTop(type) => JS('bool', '# == # || # == #', type, Object, type, dynamic);
+_isTop(type) {
+  if (JS('bool', '# === #', getGenericClass(type), getGenericClass(FutureOr))) {
+    return _isTop(JS('', '#[0]', getGenericArgs(type)));
+  }
+  return JS('bool', '# == # || # == #', type, Object, type, dynamic);
+}
 
-_isSubtype(t1, t2, covariant) => JS(
+_isSubtype(t1, t2, isCovariant) => JS(
     '',
     '''(() => {
   if ($t1 === $t2) return true;
@@ -709,7 +729,7 @@
   // currently distinguish between generic typedefs and classes.
   if (!($t1 instanceof $AbstractFunctionType) &&
       !($t2 instanceof $AbstractFunctionType)) {
-    let result = $isClassSubType($t1, $t2, $covariant);
+    let result = $isClassSubType($t1, $t2, $isCovariant);
     if (result === true || result === null) return result;
   }
 
@@ -721,17 +741,17 @@
   if (!t1) return false;
 
   if ($isFunctionType($t1) && $isFunctionType($t2)) {
-    return $isFunctionSubtype($t1, $t2, $covariant);
+    return $isFunctionSubtype($t1, $t2, $isCovariant);
   }
   
   if ($t1 instanceof $LazyJSType && $t2 instanceof $LazyJSType) {
-    return $isLazyJSSubtype($t1, $t2, $covariant);
+    return $isLazyJSSubtype($t1, $t2, $isCovariant);
   }
   
   return false;
 })()''');
 
-isClassSubType(t1, t2, covariant) => JS(
+isClassSubType(t1, t2, isCovariant) => JS(
     '',
     '''(() => {
   // We support Dart's covariant generics with the caveat that we do not
@@ -765,7 +785,7 @@
     $assert_(length == typeArguments2.length);
     for (let i = 0; i < length; ++i) {
       let result =
-          $_isSubtype(typeArguments1[i], typeArguments2[i], $covariant);
+          $_isSubtype(typeArguments1[i], typeArguments2[i], $isCovariant);
       if (!result) {
         return result;
       }
@@ -773,9 +793,25 @@
     return true;
   }
 
+  // Handle FutureOr<T>.
+  // It's not really a class type, but it's convenient to handle here.
+  if (raw1 === ${getGenericClass(FutureOr)}) {
+    // given t1 is Future<A> | A, then:
+    // (Future<A> | A) <: t2 iff Future<A> <: t2 and A <: t2.
+    let t1TypeArg = $getGenericArgs($t1)[0];
+    let t1Future = ${getGenericClass(Future)}(t1TypeArg);
+    return $isSubtype(t1Future, $t2) && $isSubtype(t1TypeArg, $t2);
+  } else if (raw2 === ${getGenericClass(FutureOr)}) {
+    // given t2 is Future<A> | A, then:
+    // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
+    let t2TypeArg = $getGenericArgs($t2)[0];
+    let t2Future = ${getGenericClass(Future)}(t2TypeArg);
+    return $isSubtype($t1, t2Future) || $isSubtype($t1, t2TypeArg);
+  }
+
   let indefinite = false;
   function definitive(t1, t2) {
-    let result = $isClassSubType(t1, t2, $covariant);
+    let result = $isClassSubType(t1, t2, $isCovariant);
     if (result == null) {
       indefinite = true;
       return false;
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
index 8560096..5e03059 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
@@ -31,7 +31,8 @@
 
 TypeMirror reflectType(Type key) {
   var unwrapped = _unwrap(key);
-  var property = JS('', 'Object.getOwnPropertyDescriptor(#, #)', unwrapped, _typeMirror);
+  var property =
+      JS('', 'Object.getOwnPropertyDescriptor(#, #)', unwrapped, _typeMirror);
   if (property != null) {
     return JS('', '#.value', property);
   }
@@ -85,7 +86,24 @@
   if (privateSymbol != null) {
     return privateSymbol;
   }
-  return getName(symbol);
+  var name = getName(symbol);
+  // TODO(jacobr): this code is duplicated in code_generator.dart
+  switch (name) {
+    case '[]':
+      name = '_get';
+      break;
+    case '[]=':
+      name = '_set';
+      break;
+    case 'unary-':
+      name = '_negate';
+      break;
+    case 'constructor':
+    case 'prototype':
+      name = '_$name';
+      break;
+  }
+  return name;
 }
 
 String _getNameForESSymbol(member) {
@@ -184,8 +202,7 @@
 
 dynamic _wrap(obj) => JS('', '#.wrapType(#)', _dart, obj);
 
-dynamic _runtimeType(obj) =>
-  _wrap(JS('', '#.getReifiedType(#)', _dart, obj));
+dynamic _runtimeType(obj) => _wrap(JS('', '#.getReifiedType(#)', _dart, obj));
 
 _unimplemented(Type t, Invocation i) {
   throw new UnimplementedError('$t.${getName(i.memberName)} unimplemented');
@@ -205,23 +222,18 @@
   }
 }
 
-class JsCombinatorMirror extends JsMirror implements CombinatorMirror {
-}
+class JsCombinatorMirror extends JsMirror implements CombinatorMirror {}
 
-class JsDeclarationMirror extends JsMirror implements DeclarationMirror {
-}
+class JsDeclarationMirror extends JsMirror implements DeclarationMirror {}
 
-class JsIsolateMirror extends JsMirror implements IsolateMirror {
-}
+class JsIsolateMirror extends JsMirror implements IsolateMirror {}
 
-class JsLibraryDependencyMirror extends JsMirror implements LibraryDependencyMirror {
-}
+class JsLibraryDependencyMirror extends JsMirror
+    implements LibraryDependencyMirror {}
 
-class JsObjectMirror extends JsMirror implements ObjectMirror {
-}
+class JsObjectMirror extends JsMirror implements ObjectMirror {}
 
 class JsInstanceMirror extends JsObjectMirror implements InstanceMirror {
-
   // Reflected object
   final reflectee;
   bool get hasReflectee => true;
@@ -235,7 +247,7 @@
 
   JsInstanceMirror._(this.reflectee);
 
-  bool operator==(Object other) {
+  bool operator ==(Object other) {
     return (other is JsInstanceMirror) && identical(reflectee, other.reflectee);
   }
 
@@ -246,8 +258,8 @@
   }
 
   // Returns a String for public members or an ES6 symbol for private members.
-  _getAccessor(dynamic reflectee, Symbol symbol, [List<dynamic> args,
-      Map<Symbol, dynamic> namedArgs]) {
+  _getAccessor(dynamic reflectee, Symbol symbol,
+      [List<dynamic> args, Map<Symbol, dynamic> namedArgs]) {
     return _getMember(symbol);
   }
 
@@ -280,8 +292,7 @@
 class JsClosureMirror extends JsInstanceMirror implements ClosureMirror {
   JsClosureMirror._(reflectee) : super._(reflectee);
 
-  InstanceMirror apply(List<dynamic> args,
-      [Map<Symbol, dynamic> namedArgs]) {
+  InstanceMirror apply(List<dynamic> args, [Map<Symbol, dynamic> namedArgs]) {
     if (namedArgs != null) {
       args = new List.from(args);
       args.add(_toJsMap(namedArgs));
@@ -310,13 +321,14 @@
       var unwrapped = _unwrap(_cls);
       // Only get metadata directly embedded on this class, not its
       // superclasses.
-      var fn = JS('Function',
-        'Object.hasOwnProperty.call(#, dart.metadata) ? #[dart.metadata] : null',
-        unwrapped, unwrapped);
+      var fn = JS(
+          'Function',
+          'Object.hasOwnProperty.call(#, dart.metadata) ? #[dart.metadata] : null',
+          unwrapped,
+          unwrapped);
       _metadata = (fn == null)
           ? const <InstanceMirror>[]
-          : new List<InstanceMirror>.unmodifiable(
-              fn().map((i) => reflect(i)));
+          : new List<InstanceMirror>.unmodifiable(fn().map((i) => reflect(i)));
     }
     return _metadata;
   }
@@ -330,14 +342,16 @@
       var constructors = _getConstructors(unwrapped);
       constructors.forEach((symbol, ft) {
         var name = getName(symbol);
-        _declarations[symbol] = new JsMethodMirror._constructor(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._constructor(this, symbol, ft);
       });
       if (constructors.isEmpty) {
         // Add a default
         var name = 'new';
         var ft = _defaultConstructorType(_unwrap(_cls));
         var symbol = new Symbol(name);
-        _declarations[symbol] = new JsMethodMirror._constructor(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._constructor(this, symbol, ft);
       }
       var fields = _getFields(unwrapped);
       fields.forEach((symbol, t) {
@@ -346,24 +360,28 @@
           metadata = t.skip(1).toList();
           t = t[0];
         }
-        _declarations[symbol] = new JsVariableMirror._(symbol, _wrap(t), metadata);
+        _declarations[symbol] =
+            new JsVariableMirror._(symbol, _wrap(t), metadata);
       });
       var methods = _getMethods(unwrapped);
       methods.forEach((symbol, ft) {
         var name = getName(symbol);
-        _declarations[symbol] = new JsMethodMirror._instanceMethod(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._instanceMethod(this, symbol, ft);
       });
       var getters = _getGetters(unwrapped);
       getters.forEach((symbol, ft) {
         var name = getName(symbol);
-        _declarations[symbol] = new JsMethodMirror._instanceMethod(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._instanceMethod(this, symbol, ft);
       });
       var setters = _getSetters(unwrapped);
       setters.forEach((symbol, ft) {
         var name = getName(symbol) + '=';
         // Create a separate symbol for the setter.
         symbol = new _internal.Symbol.es6(name, _getESSymbol(symbol));
-        _declarations[symbol] = new JsMethodMirror._instanceMethod(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._instanceMethod(this, symbol, ft);
       });
       var staticFields = _getStaticFields(unwrapped);
       staticFields.forEach((symbol, t) {
@@ -373,24 +391,29 @@
           metadata = t.skip(1).toList();
           t = t[0];
         }
-        _declarations[symbol] = new JsVariableMirror._(symbol, _wrap(t), metadata);
+        _declarations[symbol] =
+            new JsVariableMirror._(symbol, _wrap(t), metadata);
       });
       var statics = _getStatics(unwrapped);
       statics.forEach((symbol, ft) {
         var name = getName(symbol);
-        _declarations[symbol] = new JsMethodMirror._staticMethod(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._staticMethod(this, symbol, ft);
       });
       var staticGetters = _getStaticGetters(unwrapped);
       staticGetters.forEach((symbol, ft) {
         var name = getName(symbol);
-        _declarations[symbol] = new JsMethodMirror._staticMethod(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._staticMethod(this, symbol, ft);
       });
       var staticSetters = _getStaticSetters(unwrapped);
       staticSetters.forEach((symbol, ft) {
         var name = getName(symbol);
-        _declarations[symbol] = new JsMethodMirror._staticMethod(this, symbol, ft);
+        _declarations[symbol] =
+            new JsMethodMirror._staticMethod(this, symbol, ft);
       });
-      _declarations = new Map<Symbol, DeclarationMirror>.unmodifiable(_declarations);
+      _declarations =
+          new Map<Symbol, DeclarationMirror>.unmodifiable(_declarations);
     }
     return _declarations;
   }
@@ -401,9 +424,10 @@
         simpleName = new Symbol(JS('String', '#.name', _unwrap(cls))) {
     var typeArgs = _getGenericArgs(_unwrap(cls));
     if (typeArgs == null) {
-      _typeArguments = const[];
+      _typeArguments = const [];
     } else {
-      _typeArguments = new List.unmodifiable(typeArgs.map((t) => reflectType(_wrap(t))));
+      _typeArguments =
+          new List.unmodifiable(typeArgs.map((t) => reflectType(_wrap(t))));
     }
   }
 
@@ -413,8 +437,8 @@
     var name = getName(constructorName);
     assert(namedArgs == null || namedArgs.isEmpty);
     var instance = (name == 'new' || name == '')
-      ? JS('', 'new #(...#)', _unwrap(_cls), args)
-      : JS('', 'new (#.#)(...#)', _unwrap(_cls), name, args);
+        ? JS('', 'new #(...#)', _unwrap(_cls), args)
+        : JS('', 'new (#.#)(...#)', _unwrap(_cls), name, args);
     return reflect(instance);
   }
 
@@ -445,7 +469,8 @@
   }
 
   List<ClassMirror> get superinterfaces {
-    _Lazy<List<Type>> interfaceThunk = JS('', '#[dart.implements]', _unwrap(_cls));
+    _Lazy<List<Type>> interfaceThunk =
+        JS('', '#[dart.implements]', _unwrap(_cls));
     if (interfaceThunk == null) {
       return [];
     } else {
@@ -455,7 +480,9 @@
   }
 
   bool get hasReflectedType => true;
-  Type get reflectedType { return _cls; }
+  Type get reflectedType {
+    return _cls;
+  }
 
   bool get isOriginalDeclaration => _raw == null;
 
@@ -467,7 +494,8 @@
     if (_raw == null) {
       return this;
     }
-    throw new UnimplementedError("ClassMirror.originalDeclaration unimplemented");
+    throw new UnimplementedError(
+        "ClassMirror.originalDeclaration unimplemented");
   }
 
   ClassMirror get superclass {
@@ -490,7 +518,7 @@
     }
     if (mixins.length > 1) {
       throw new UnsupportedError("ClassMirror.mixin not yet supported for "
-        "classes ($_cls) with multiple mixins");
+          "classes ($_cls) with multiple mixins");
     }
     _mixin = reflectType(_wrap(mixins[0]));
     return _mixin;
@@ -546,18 +574,27 @@
   Symbol get simpleName => _symbol;
 
   JsMethodMirror._constructor(JsClassMirror cls, Symbol symbol, ftype)
-    : _symbol = symbol, _name = getName(symbol), isConstructor = true, isStatic = false {
-      _createParameterMirrorList(ftype);
+      : _symbol = symbol,
+        _name = getName(symbol),
+        isConstructor = true,
+        isStatic = false {
+    _createParameterMirrorList(ftype);
   }
 
   JsMethodMirror._instanceMethod(JsClassMirror cls, Symbol symbol, ftype)
-    : _symbol = symbol, _name = getName(symbol), isConstructor = false, isStatic = false {
-      _createParameterMirrorList(ftype);
+      : _symbol = symbol,
+        _name = getName(symbol),
+        isConstructor = false,
+        isStatic = false {
+    _createParameterMirrorList(ftype);
   }
 
   JsMethodMirror._staticMethod(JsClassMirror cls, Symbol symbol, ftype)
-    : _symbol = symbol, _name = getName(symbol), isConstructor = false, isStatic = true {
-      _createParameterMirrorList(ftype);
+      : _symbol = symbol,
+        _name = getName(symbol),
+        isConstructor = false,
+        isStatic = true {
+    _createParameterMirrorList(ftype);
   }
 
   // TODO(vsm): Support named constructors.
@@ -600,7 +637,8 @@
       var type = args[i];
       var metadata = ftype.metadata[i];
       // TODO(vsm): Recover the param name.
-      var param = new JsParameterMirror._(new Symbol(''), _wrap(type), metadata);
+      var param =
+          new JsParameterMirror._(new Symbol(''), _wrap(type), metadata);
       params[i] = param;
     }
 
@@ -608,7 +646,8 @@
       var type = opts[i];
       var metadata = ftype.metadata[args.length + i];
       // TODO(vsm): Recover the param name.
-      var param = new JsParameterMirror._(new Symbol(''), _wrap(type), metadata);
+      var param =
+          new JsParameterMirror._(new Symbol(''), _wrap(type), metadata);
       params[i + args.length] = param;
     }
 
diff --git a/pkg/dev_compiler/tool/run.js b/pkg/dev_compiler/tool/run.js
index 7306964..6783750 100644
--- a/pkg/dev_compiler/tool/run.js
+++ b/pkg/dev_compiler/tool/run.js
@@ -45,6 +45,7 @@
 var module = requirejs(test);
 var lib = test.split('/').slice(-1)[0];
 try {
+  sdk._isolate_helper.startRootIsolate(() => {}, []);
   module[lib].main();
   console.log('Test ' + test + ' passed.');
 } catch (e) {
diff --git a/pkg/dev_compiler/tool/sdk_expected_errors.txt b/pkg/dev_compiler/tool/sdk_expected_errors.txt
index c3223fa..b60c5bd 100644
--- a/pkg/dev_compiler/tool/sdk_expected_errors.txt
+++ b/pkg/dev_compiler/tool/sdk_expected_errors.txt
@@ -1,5 +1,6 @@
 [error] Couldn't infer type parameter 'T'; '_ControllerEventSinkWrapper<dynamic>' must be of type 'EventSink<T>'. (dart:async/stream.dart, line 1346, col 16)
 [error] The argument type '_ControllerEventSinkWrapper' can't be assigned to the parameter type 'EventSink<T>'. (dart:async/stream.dart, line 1346, col 53)
+[error] Type parameter bound types must be instantiated. (dart:collection/queue.dart, line 99, col 29)
 [error] Invalid override. The type of 'ChunkedConverter.bind' ('(dynamic) → dynamic') isn't a subtype of 'Converter<S, T>.bind' ('(Stream<S>) → Stream<T>'). (dart:convert/chunked_conversion.dart, line 14, col 3)
 [error] Invalid override. The type of 'ChunkedConverter.bind' ('(dynamic) → dynamic') isn't a subtype of 'StreamTransformer<S, T>.bind' ('(Stream<S>) → Stream<T>'). (dart:convert/chunked_conversion.dart, line 14, col 3)
 [error] Invalid override. The type of 'ChunkedConverter.startChunkedConversion' ('(dynamic) → dynamic') isn't a subtype of 'Converter<S, T>.startChunkedConversion' ('(Sink<T>) → Sink<S>'). (dart:convert/chunked_conversion.dart, line 15, col 3)
@@ -10,7 +11,9 @@
 [error] Only redirecting factory constructors can be declared to be 'const'. (dart:core/string.dart, line 156, col 9)
 [error] Const constructors can't throw exceptions. (dart:core/string.dart, line 157, col 5)
 [error] Couldn't infer type parameter 'S'; 'RandomAccessFile' must be of type 'File'. (dart:io/file_impl.dart, line 216, col 19)
-[error] The argument type '([dynamic]) → void' can't be assigned to the parameter type '(_ConnectionInfo) → dynamic'. (dart:io/http_impl.dart, line 1633, col 19)
+[error] The argument type '(RandomAccessFile) → Future<RandomAccessFile>' can't be assigned to the parameter type '(RandomAccessFile) → FutureOr<File>'. (dart:io/file_impl.dart, line 216, col 24)
+[error] The return type 'Future' isn't a 'FutureOr<File>', as defined by the method ''. (dart:io/file_impl.dart, line 545, col 14)
+[error] The argument type '([dynamic]) → void' can't be assigned to the parameter type '(_ConnectionInfo) → FutureOr<void>'. (dart:io/http_impl.dart, line 1633, col 19)
 [error] The return type 'StreamSubscription<int>' isn't a 'StreamSubscription<List<int>>', as defined by the method 'listen'. (dart:io/http_parser.dart, line 208, col 14)
 [error] The argument type '(List<int>) → void' can't be assigned to the parameter type '(int) → void'. (dart:io/http_parser.dart, line 209, col 19)
 [error] Couldn't infer type parameter 'V'; 'Object' must be of type 'String'. (dart:io/io_resource_info.dart, line 27, col 7)
@@ -26,12 +29,13 @@
 [error] Couldn't infer type parameter 'V'; 'Object' must be of type 'String'. (dart:io/io_resource_info.dart, line 159, col 5)
 [error] The element type 'int' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 161, col 13)
 [error] The element type 'double' can't be assigned to the map value type 'String'. (dart:io/io_resource_info.dart, line 164, col 20)
-[error] The argument type '([dynamic]) → void' can't be assigned to the parameter type '(RawSocket) → dynamic'. (dart:io/secure_socket.dart, line 591, col 28)
+[error] The argument type '([dynamic]) → void' can't be assigned to the parameter type '(RawSocket) → FutureOr<void>'. (dart:io/secure_socket.dart, line 591, col 28)
 [error] The argument type 'List' can't be assigned to the parameter type 'Iterable<int>'. (dart:io/secure_socket.dart, line 1129, col 23)
 [error] Undefined name 'lineMode'. (dart:io/stdio.dart, line 64, col 10)
 [error] The name 'echoMode=' is already defined. (dart:io/stdio.dart, line 126, col 12)
 [error] The name 'lineMode=' is already defined. (dart:io/stdio.dart, line 145, col 12)
 [error] Couldn't infer type parameter 'S'; 'dynamic' must be of type 'WebSocket'. (dart:io/websocket_impl.dart, line 469, col 10)
+[error] The argument type '(String) → Future<dynamic>' can't be assigned to the parameter type '(dynamic) → FutureOr<WebSocket>'. (dart:io/websocket_impl.dart, line 469, col 15)
 [error] Invalid override. The type of 'JsArray.[]=' ('(Object, E) → void') isn't a subtype of 'JsObject.[]=' ('(Object, dynamic) → dynamic'). (dart:js, line 363, col 3)
 [warning] Unsafe implicit cast from 'List<dynamic>' to 'List<String>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:_js_helper/regexp_helper.dart, line 140, col 43)
 [warning] Unsafe implicit cast from 'List<dynamic>' to 'List<String>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:_js_helper/regexp_helper.dart, line 152, col 43)
@@ -73,13 +77,18 @@
 [warning] Unsafe implicit cast from '(T) → void' to '(Event) → dynamic'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:html, line 40126, col 45)
 [warning] Unsafe implicit cast from 'List<dynamic>' to 'List<int>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/data_transformer.dart, line 492, col 23)
 [warning] Unsafe implicit cast from 'Stream<dynamic>' to 'Stream<FileSystemEntity>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/directory_impl.dart, line 239, col 12)
+[warning] Missing return value after 'return'. (dart:io/directory_impl.dart, line 394, col 15)
+[warning] Missing return value after 'return'. (dart:io/file_impl.dart, line 101, col 11)
 [warning] Unsafe implicit cast from 'Future<dynamic>' to 'Future<List<int>>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/file_impl.dart, line 484, col 14)
 [warning] Unsafe implicit cast from 'List<dynamic>' to 'List<int>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/file_impl.dart, line 831, col 33)
 [warning] Unsafe implicit cast from 'StreamSubscription<dynamic>' to 'StreamSubscription<List<int>>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/http_impl.dart, line 269, col 14)
 [warning] Unsafe implicit cast from 'Stream<dynamic>' to 'Stream<List<int>>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/http_impl.dart, line 1056, col 29)
 [warning] Unsafe implicit cast from 'Function' to '(List<int>) → void'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/http_impl.dart, line 1173, col 54)
 [warning] Unsafe implicit cast from 'Function' to '(List<int>) → void'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/http_impl.dart, line 1175, col 33)
+[warning] Missing return value after 'return'. (dart:io/http_impl.dart, line 1401, col 21)
+[warning] Missing return value after 'return'. (dart:io/http_impl.dart, line 1403, col 31)
 [warning] Unsafe implicit cast from 'Future<dynamic>' to 'Future<_ConnectionInfo>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/http_impl.dart, line 1635, col 14)
+[warning] Missing return value after 'return'. (dart:io/http_impl.dart, line 2111, col 42)
 [warning] Unsafe implicit cast from 'StreamSubscription<dynamic>' to 'StreamSubscription<List<int>>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/http_parser.dart, line 201, col 16)
 [warning] Unsafe implicit cast from 'StreamSubscription<dynamic>' to 'StreamSubscription<List<int>>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/http_parser.dart, line 203, col 50)
 [warning] Unsafe implicit cast from 'Map<dynamic, dynamic>' to 'Map<String, String>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/platform_impl.dart, line 100, col 69)
@@ -87,6 +96,9 @@
 [warning] Unsafe implicit cast from 'Future<dynamic>' to 'Future<SecureSocket>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/secure_socket.dart, line 138, col 12)
 [warning] Unsafe implicit cast from 'StreamSubscription<dynamic>' to 'StreamSubscription<RawSocketEvent>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/secure_socket.dart, line 446, col 33)
 [warning] Unsafe implicit cast from 'Future<dynamic>' to 'Future<RawSecureSocket>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/secure_socket.dart, line 580, col 12)
+[warning] Missing return value after 'return'. (dart:io/secure_socket.dart, line 861, col 11)
+[warning] Missing return value after 'return'. (dart:io/secure_socket.dart, line 868, col 13)
+[warning] Missing return value after 'return'. (dart:io/secure_socket.dart, line 882, col 11)
 [warning] Unsafe implicit cast from 'List<dynamic>' to 'List<int>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/secure_socket.dart, line 1176, col 32)
 [warning] Unsafe implicit cast from 'List<dynamic>' to 'List<int>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/stdio.dart, line 109, col 28)
 [warning] Unsafe implicit cast from 'Future<dynamic>' to 'Future<WebSocket>'. This usually indicates that type information was lost and resulted in 'dynamic' and/or a place that will have a failure at runtime. (dart:io/websocket_impl.dart, line 471, col 14)
diff --git a/pkg/front_end/lib/incremental_kernel_generator.dart b/pkg/front_end/lib/incremental_kernel_generator.dart
index 5e80960..3b3b429 100644
--- a/pkg/front_end/lib/incremental_kernel_generator.dart
+++ b/pkg/front_end/lib/incremental_kernel_generator.dart
@@ -66,6 +66,16 @@
   /// from disk; they are assumed to be unchanged regardless of the state of the
   /// filesystem.
   ///
+  /// If [watch] is not `null`, then when a source file is first used
+  /// by [computeDelta], [watch] is called with the Uri of that source
+  /// file and `used` == `true` indicating that the source file is being
+  /// used when compiling the program. The content of the file is not read
+  /// until the Future returned by [watch] completes. If during a subsequent
+  /// call to [computeDelta], a source file that was being used is no longer
+  /// used, then [watch] is called with the Uri of that source file and
+  /// `used` == `false` indicating that the source file is no longer needed.
+  /// Multiple invocations of [watch] may be running concurrently.
+  ///
   /// If the future completes successfully, the previous file state is updated
   /// and the set of valid sources is set to the set of all sources in the
   /// program.
@@ -74,7 +84,7 @@
   /// source code), the caller may consider the previous file state and the set
   /// of valid sources to be unchanged; this means that once the user fixes the
   /// errors, it is safe to call [computeDelta] again.
-  Future<DeltaProgram> computeDelta();
+  Future<DeltaProgram> computeDelta({Future<Null> watch(Uri uri, bool used)});
 
   /// Remove any source file(s) associated with the given file path from the set
   /// of valid sources.  This guarantees that those files will be re-read on the
diff --git a/pkg/front_end/lib/incremental_resolved_ast_generator.dart b/pkg/front_end/lib/incremental_resolved_ast_generator.dart
index 79799de..dd5e4c7 100644
--- a/pkg/front_end/lib/incremental_resolved_ast_generator.dart
+++ b/pkg/front_end/lib/incremental_resolved_ast_generator.dart
@@ -32,9 +32,9 @@
 class ResolvedLibrary {
   final CompilationUnit definingCompilationUnit;
 
-  ResolvedLibrary(this.definingCompilationUnit);
+  final Map<Uri, CompilationUnit> partUnits;
 
-  // TODO(paulberry): add support for parts.
+  ResolvedLibrary(this.definingCompilationUnit, this.partUnits);
 }
 
 /// Interface for generating an initial resolved representation of a program and
diff --git a/pkg/front_end/lib/src/base/file_repository.dart b/pkg/front_end/lib/src/base/file_repository.dart
new file mode 100644
index 0000000..d4d4f7c
--- /dev/null
+++ b/pkg/front_end/lib/src/base/file_repository.dart
@@ -0,0 +1,100 @@
+// 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.
+
+/// Data structure storing an association between URI and file contents.
+///
+/// Each URI is also associated with a unique arbitrary path ending in ".dart".
+/// This allows interfacing with analyzer code that expects to manipulate paths
+/// rather than URIs.
+class FileRepository {
+  /// Regular expression matching the arbitrary file paths generated by
+  /// [_pathForIndex].
+  static final _pathRegexp = new RegExp(r'^/[0-9]+\.dart$');
+
+  /// The URIs currently stored in the repository.
+  final _uris = <Uri>[];
+
+  /// Map from a URI to its index in [_uris].
+  final _uriToIndexMap = <Uri, int>{};
+
+  /// The file contents associated with the URIs in [_uris].
+  final _contents = <String>[];
+
+  /// Clear any contents stored in the file repository.  The association between
+  /// URI and arbitrary path is preserved.
+  ///
+  /// Subsequent calls to [contentsForPath] will have undefined results until
+  /// new contents are stored using [store].
+  void clearContents() {
+    for (var i = 0; i < _contents.length; i++) {
+      _contents[i] = null;
+    }
+  }
+
+  /// Return the contents of the file whose arbitary path is [path].
+  ///
+  /// The path must have been returned by a previous call to [store] or
+  /// [pathForUri].
+  String contentsForPath(String path) {
+    var contents = _contents[_indexForPath(path)];
+    assert(contents != null);
+    return contents;
+  }
+
+  /// For testing purposes, return the contents of all files stored in the file
+  /// repository, as a map from path to contents string.
+  Map<String, String> getContentsForTesting() {
+    var result = <String, String>{};
+    for (var i = 0; i < _contents.length; i++) {
+      if (_contents[i] != null) result[_pathForIndex(i)] = _contents[i];
+    }
+    return result;
+  }
+
+  /// Return the arbitrary path associated with [uri].
+  ///
+  /// If [allocate] is `false` (the default), the uri must have previously been
+  /// allocated a corresponding path, e.g. via a call to [store].  If [allocate]
+  /// is `true`, then a new path will be allocated if necessary.
+  String pathForUri(Uri uri, {bool allocate: false}) {
+    return _pathForIndex(_indexForUri(uri, allocate));
+  }
+
+  /// Associate the given [uri] with file [contents].
+  ///
+  /// The arbitrary path associated with the file is returned.
+  String store(Uri uri, String contents) {
+    int index = _indexForUri(uri, true);
+    _contents[index] = contents;
+    return _pathForIndex(index);
+  }
+
+  /// Return the URI for the file whose arbitrary path is [path].
+  ///
+  /// The path must have been returned by a previous call to [store] or
+  /// [pathForUri].
+  Uri uriForPath(String path) => _uris[_indexForPath(path)];
+
+  /// Return the index into [_uris] and [_contents] matching the arbitrary path
+  /// [path].
+  int _indexForPath(String path) {
+    assert(_pathRegexp.hasMatch(path));
+    return int.parse(path.substring(1, path.length - 5));
+  }
+
+  int _indexForUri(Uri uri, bool allocate) {
+    int index = _uriToIndexMap[uri];
+    assert(allocate || index != null);
+    if (index == null) {
+      index = _uris.length;
+      _uris.add(uri);
+      _uriToIndexMap[uri] = index;
+      _contents.add(null);
+    }
+    return index;
+  }
+
+  /// Return the arbitrary path associated with the given index.
+  String _pathForIndex(int index) => '/$index.dart';
+}
diff --git a/pkg/front_end/lib/src/dependency_grapher_impl.dart b/pkg/front_end/lib/src/dependency_grapher_impl.dart
index 0951931..66aa443 100644
--- a/pkg/front_end/lib/src/dependency_grapher_impl.dart
+++ b/pkg/front_end/lib/src/dependency_grapher_impl.dart
@@ -9,7 +9,6 @@
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:front_end/dependency_grapher.dart';
-import 'package:front_end/file_system.dart';
 import 'package:front_end/src/async_dependency_walker.dart';
 import 'package:front_end/src/base/processed_options.dart';
 import 'package:front_end/src/base/uri_resolver.dart';
@@ -21,17 +20,26 @@
 /// `export`, and `part` declarations to discover a graph of all files involved
 /// in the program.
 ///
+/// If a [fileReader] is supplied, it is used to read file contents; otherwise
+/// they are read directly from `options.fileSystem`.
+///
 /// This is intended for internal use by the front end.  Clients should use
 /// package:front_end/dependency_grapher.dart.
-Future<Graph> graphForProgram(
-    List<Uri> sources, ProcessedOptions options) async {
+Future<Graph> graphForProgram(List<Uri> sources, ProcessedOptions options,
+    {FileReader fileReader}) async {
   var uriResolver = await options.getUriResolver();
-  var walker = new _Walker(options.fileSystem, uriResolver, options.compileSdk);
+  fileReader ??= (originalUri, resolvedUri) =>
+      options.fileSystem.entityForUri(resolvedUri).readAsString();
+  var walker = new _Walker(fileReader, uriResolver, options.compileSdk);
   var startingPoint = new _StartingPoint(walker, sources);
   await walker.walk(startingPoint);
   return walker.graph;
 }
 
+/// Type of the callback function used by [graphForProgram] to read file
+/// contents.
+typedef Future<String> FileReader(Uri originalUri, Uri resolvedUri);
+
 class _Scanner extends Scanner {
   _Scanner(String contents) : super(new CharSequenceReader(contents)) {
     preserveComments = false;
@@ -54,13 +62,13 @@
 }
 
 class _Walker extends AsyncDependencyWalker<_WalkerNode> {
-  final FileSystem fileSystem;
+  final FileReader fileReader;
   final UriResolver uriResolver;
   final _nodesByUri = <Uri, _WalkerNode>{};
   final graph = new Graph();
   final bool compileSdk;
 
-  _Walker(this.fileSystem, this.uriResolver, this.compileSdk);
+  _Walker(this.fileReader, this.uriResolver, this.compileSdk);
 
   @override
   Future<Null> evaluate(_WalkerNode v) {
@@ -105,8 +113,7 @@
       // in the proper way and continue.
       throw new StateError('Invalid URI: $uri');
     }
-    var contents =
-        await walker.fileSystem.entityForUri(resolvedUri).readAsString();
+    var contents = await walker.fileReader(uri, resolvedUri);
     var scanner = new _Scanner(contents);
     var token = scanner.tokenize();
     // TODO(paulberry): report errors.
diff --git a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
index 8ea6d18..50473eb 100644
--- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart
@@ -57,12 +57,13 @@
         _options = options;
 
   @override
-  Future<DeltaProgram> computeDelta() async {
+  Future<DeltaProgram> computeDelta(
+      {Future<Null> watch(Uri uri, bool used)}) async {
     var deltaLibraries = await _resolvedAstGenerator.computeDelta();
     var kernelOptions = _convertOptions(_options);
     var packages = null; // TODO(paulberry)
     var kernels = <Uri, Program>{};
-    deltaLibraries.newState.forEach((uri, resolvedLibrary) {
+    for (Uri uri in deltaLibraries.newState.keys) {
       // The kernel generation code doesn't currently support building a kernel
       // directly from resolved ASTs--it wants to query an analysis context.  So
       // we provide it with a proxy analysis context that feeds it the resolved
@@ -76,7 +77,11 @@
           new DartLoader(repository, kernelOptions, packages, context: context);
       loader.loadLibrary(uri);
       kernels[uri] = new Program(repository.libraries);
-    });
+      // TODO(paulberry) rework watch invocation to eliminate race condition,
+      // include part source files, and prevent watch from being a bottleneck
+      if (watch != null) await watch(uri, true);
+    }
+    // TODO(paulberry) invoke watch with used=false for each unused source
     return new DeltaProgram(kernels);
   }
 
@@ -116,9 +121,13 @@
   CompilationUnit resolveCompilationUnit(
       Source unitSource, LibraryElement library) {
     assert(_resolvedLibraries.containsKey(library.source.uri));
-    // TODO(paulberry): support parts.
-    assert(unitSource == library.source);
-    return _resolvedLibraries[library.source.uri].definingCompilationUnit;
+    var resolvedLibrary = _resolvedLibraries[library.source.uri];
+    if (unitSource == library.source) {
+      return resolvedLibrary.definingCompilationUnit;
+    } else {
+      assert(resolvedLibrary.partUnits.containsKey(unitSource.uri));
+      return resolvedLibrary.partUnits[unitSource.uri];
+    }
   }
 }
 
diff --git a/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart b/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
index 20c4e2e..aa51fbf 100644
--- a/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
@@ -4,6 +4,7 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
@@ -12,10 +13,11 @@
 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_dart.dart';
 import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/summary/summary_sdk.dart';
 import 'package:analyzer/src/util/absolute_path.dart';
 import 'package:front_end/incremental_resolved_ast_generator.dart';
+import 'package:front_end/src/base/file_repository.dart';
 import 'package:front_end/src/base/processed_options.dart';
 import 'package:front_end/src/base/source.dart';
 import 'package:front_end/src/dependency_grapher_impl.dart';
@@ -43,15 +45,14 @@
 class IncrementalResolvedAstGeneratorImpl
     implements IncrementalResolvedAstGenerator {
   driver.AnalysisDriverScheduler _scheduler;
-  final _pathToUriMap = <String, Uri>{};
-  final _uriToPathMap = <Uri, String>{};
-  final _fileContents = <String, String>{};
+  final _fileRepository = new FileRepository();
   _ResourceProviderProxy _resourceProvider;
   driver.AnalysisDriver _driver;
   bool _isInitialized = false;
   final ProcessedOptions _options;
   final Uri _source;
   bool _schedulerStarted = false;
+  final _fileState = <Uri, String>{};
 
   IncrementalResolvedAstGeneratorImpl(this._source, this._options);
 
@@ -64,30 +65,45 @@
     // so we have to find all the files first to read their contents.
     // TODO(paulberry): this is an unnecessary source of duplicate work and
     // should be eliminated ASAP.
-    var graph = await graphForProgram([_source], _options);
+    var graph =
+        await graphForProgram([_source], _options, fileReader: _fileReader);
+    // TODO(paulberry): collect no-longer-referenced files from _fileState and
+    // _fileRepository.
     var libraries = <Uri, ResolvedLibrary>{};
-    // TODO(paulberry): it should be possible to seed the driver using a URI,
-    // not a file path.
     if (!_schedulerStarted) {
       _scheduler.start();
       _schedulerStarted = true;
     }
-    _driver.addFile(_source.path);
     for (var libraryCycle in graph.topologicallySortedCycles) {
-      for (var uri in libraryCycle.libraries.keys) {
-        var contents =
-            await _options.fileSystem.entityForUri(uri).readAsString();
-        _storeVirtualFile(uri, uri.path, contents);
+      for (var libraryUri in libraryCycle.libraries.keys) {
+        var libraryNode = libraryCycle.libraries[libraryUri];
+        for (var partUri in libraryNode.parts) {
+          // TODO(paulberry): resolve the part URI.
+          _fileReader(partUri, partUri);
+        }
       }
-      // The driver will request files from dart:, even though it actually uses
-      // the data from the summary.  TODO(paulberry): fix this.
-      _storeVirtualFile(_DartSdkProxy._dartCoreSource.uri, 'core.dart', '');
-      for (var uri in libraryCycle.libraries.keys) {
-        var result = await _driver.getResult(uri.path);
+      for (var libraryUri in libraryCycle.libraries.keys) {
+        var libraryNode = libraryCycle.libraries[libraryUri];
+        var result =
+            await _driver.getResult(_fileRepository.pathForUri(libraryUri));
         // TODO(paulberry): handle errors.
-        libraries[uri] = new ResolvedLibrary(result.unit);
+        var definingCompilationUnit = result.unit;
+        var partUnits = <Uri, CompilationUnit>{};
+        for (var partUri in libraryNode.parts) {
+          // Really we ought to have a driver API that lets us request a
+          // specific part of a given library.  Otherwise we will run into
+          // problems if a part is included in multiple libraries.
+          // TODO(paulberry): address this.
+          var partResult =
+              await _driver.getResult(_fileRepository.pathForUri(partUri));
+          // TODO(paulberry): handle errors.
+          partUnits[partUri] = partResult.unit;
+        }
+        libraries[libraryUri] =
+            new ResolvedLibrary(definingCompilationUnit, partUnits);
       }
     }
+    _driver.addFile(_fileRepository.pathForUri(_source));
     // TODO(paulberry): stop the scheduler
     return new DeltaLibraries(libraries);
   }
@@ -96,23 +112,19 @@
     // TODO(paulberry): can we just use null?
     var performanceLog = new driver.PerformanceLog(new _NullStringSink());
     _scheduler = new driver.AnalysisDriverScheduler(performanceLog);
-    _resourceProvider =
-        new _ResourceProviderProxy(_fileContents, _pathToUriMap);
+    _resourceProvider = new _ResourceProviderProxy(_fileRepository);
     // TODO(paulberry): MemoryByteStore leaks memory (it never discards data).
     // Do something better here.
     var byteStore = new MemoryByteStore();
     // TODO(paulberry): can we just use null?
     var fileContentOverlay = new FileContentOverlay();
     var sdkContext = new AnalysisContextImpl();
-    var dartSdk = new _DartSdkProxy(await _options.getSdkSummary(), sdkContext);
+    var sdkBundle = await _options.getSdkSummary();
+    var dartSdk = new _DartSdkProxy(sdkBundle, sdkContext, _fileRepository);
     sdkContext.sourceFactory =
         new SourceFactory([new DartUriResolver(dartSdk)]);
-    bool strongMode = true; // TODO(paulberry): support strong mode flag.
-    sdkContext.resultProvider = new SdkSummaryResultProvider(
-        sdkContext, await _options.getSdkSummary(), strongMode);
 
-    var sourceFactory =
-        new _SourceFactoryProxy(dartSdk, _pathToUriMap, _uriToPathMap);
+    var sourceFactory = new _SourceFactoryProxy(dartSdk, _fileRepository);
     var analysisOptions = new AnalysisOptionsImpl();
     _driver = new driver.AnalysisDriver(
         _scheduler,
@@ -122,7 +134,8 @@
         fileContentOverlay,
         'front_end',
         sourceFactory,
-        analysisOptions);
+        analysisOptions,
+        sdkBundle: sdkBundle);
     _isInitialized = true;
   }
 
@@ -133,6 +146,8 @@
 
   @override
   void invalidateAll() {
+    _fileState.clear();
+    _fileRepository.clearContents();
     // TODO(paulberry): verify that this has an effect (requires a multi-file
     // test).
     if (_isInitialized) {
@@ -140,30 +155,31 @@
     }
   }
 
-  void _storeVirtualFile(Uri uri, String path, String contents) {
-    _pathToUriMap[path] = uri;
-    _uriToPathMap[uri] = path;
-    _fileContents[path] = contents;
+  Future<String> _fileReader(Uri originalUri, Uri resolvedUri) async {
+    String contents = _fileState[resolvedUri] ??=
+        await _options.fileSystem.entityForUri(resolvedUri).readAsString();
+    _fileRepository.store(originalUri, contents);
+    return contents;
   }
 }
 
 class _DartSdkProxy implements DartSdk {
-  static final _dartCoreSource =
-      new _SourceProxy(Uri.parse('dart:core'), 'core.dart');
-
   final PackageBundle summary;
 
   final AnalysisContext context;
 
-  _DartSdkProxy(this.summary, this.context);
+  final FileRepository _fileRepository;
+
+  _DartSdkProxy(this.summary, this.context, this._fileRepository);
 
   @override
   PackageBundle getLinkedBundle() => summary;
 
   @override
-  Source mapDartUri(String uri) {
-    // TODO(paulberry): this seems hacky.
-    return new _SourceProxy(Uri.parse(uri), '$uri.dart');
+  Source mapDartUri(String uriString) {
+    var uri = Uri.parse(uriString);
+    return new _SourceProxy(
+        uri, _fileRepository.pathForUri(uri, allocate: true));
   }
 
   noSuchMethod(Invocation invocation) => unimplemented();
@@ -192,8 +208,7 @@
 
   @override
   String readAsStringSync() {
-    assert(_resourceProvider.fileContents.containsKey(path));
-    return _resourceProvider.fileContents[path];
+    return _resourceProvider._fileRepository.contentsForPath(path);
   }
 }
 
@@ -206,10 +221,9 @@
 }
 
 class _ResourceProviderProxy implements ResourceProvider {
-  final Map<String, String> fileContents;
-  final Map<String, Uri> pathToUriMap;
+  final FileRepository _fileRepository;
 
-  _ResourceProviderProxy(this.fileContents, this.pathToUriMap);
+  _ResourceProviderProxy(this._fileRepository);
 
   @override
   AbsolutePathContext get absolutePathContext => throw new UnimplementedError();
@@ -219,9 +233,8 @@
 
   @override
   File getFile(String path) {
-    assert(fileContents.containsKey(path));
-    assert(pathToUriMap.containsKey(path));
-    return new _FileProxy(new _SourceProxy(pathToUriMap[path], path), this);
+    return new _FileProxy(
+        new _SourceProxy(_fileRepository.uriForPath(path), path), this);
   }
 
   @override
@@ -242,25 +255,21 @@
   @override
   final DartSdk dartSdk;
 
-  final Map<String, Uri> pathToUriMap;
-
-  final Map<Uri, String> uriToPathMap;
+  final FileRepository _fileRepository;
 
   @override
   AnalysisContext context;
 
-  _SourceFactoryProxy(this.dartSdk, this.pathToUriMap, this.uriToPathMap);
+  _SourceFactoryProxy(this.dartSdk, this._fileRepository);
 
   @override
-  SourceFactory clone() =>
-      new _SourceFactoryProxy(dartSdk, pathToUriMap, uriToPathMap);
+  SourceFactory clone() => new _SourceFactoryProxy(dartSdk, _fileRepository);
 
   @override
   Source forUri(String absoluteUri) {
-    if (absoluteUri == 'dart:core') return _DartSdkProxy._dartCoreSource;
     Uri uri = Uri.parse(absoluteUri);
-    assert(uriToPathMap.containsKey(uri));
-    return new _SourceProxy(uri, uriToPathMap[uri]);
+    return new _SourceProxy(
+        uri, _fileRepository.pathForUri(uri, allocate: true));
   }
 
   noSuchMethod(Invocation invocation) => unimplemented();
@@ -268,8 +277,10 @@
   Source resolveUri(Source containingSource, String containedUri) {
     // TODO(paulberry): re-use code from dependency_grapher_impl, and support
     // SDK URI resolution logic.
-    var absoluteUri = containingSource.uri.resolve(containedUri);
-    return forUri(absoluteUri.toString());
+    String absoluteUri =
+        resolveRelativeUri(containingSource?.uri, Uri.parse(containedUri))
+            .toString();
+    return forUri(absoluteUri);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/scanner/token.dart b/pkg/front_end/lib/src/scanner/token.dart
index 95c1005..abd0194 100644
--- a/pkg/front_end/lib/src/scanner/token.dart
+++ b/pkg/front_end/lib/src/scanner/token.dart
@@ -166,6 +166,9 @@
 
   static const Keyword CONTINUE = const Keyword._('CONTINUE', "continue");
 
+  static const Keyword COVARIANT =
+      const Keyword._('COVARIANT', "covariant", true);
+
   static const Keyword DEFAULT = const Keyword._('DEFAULT', "default");
 
   static const Keyword DEFERRED = const Keyword._('DEFERRED', "deferred", true);
@@ -257,6 +260,7 @@
     CLASS,
     CONST,
     CONTINUE,
+    COVARIANT,
     DEFAULT,
     DEFERRED,
     DO,
diff --git a/pkg/front_end/test/incremental_kernel_generator_test.dart b/pkg/front_end/test/incremental_kernel_generator_test.dart
index 9dc58c2..ea23134 100644
--- a/pkg/front_end/test/incremental_kernel_generator_test.dart
+++ b/pkg/front_end/test/incremental_kernel_generator_test.dart
@@ -32,8 +32,6 @@
   return resourceProvider.getFile(path).readAsBytesSync();
 }
 
-typedef void LibraryChecker(Library lib);
-
 @reflectiveTest
 class IncrementalKernelGeneratorTest {
   static final sdkSummaryUri = Uri.parse('special:sdk_summary');
@@ -44,17 +42,6 @@
   /// The object under test.
   IncrementalKernelGenerator incrementalKernelGenerator;
 
-  void checkLibraries(
-      List<Library> libraries, Map<Uri, LibraryChecker> expected) {
-    expect(
-        libraries.map((lib) => lib.importUri), unorderedEquals(expected.keys));
-    var librariesMap = <Uri, Library>{};
-    for (var lib in libraries) {
-      librariesMap[lib.importUri] = lib;
-    }
-    expected.forEach((uri, checker) => checker(librariesMap[uri]));
-  }
-
   Future<Map<Uri, Program>> getInitialState(Uri startingUri) async {
     fileSystem.entityForUri(sdkSummaryUri).writeAsBytesSync(_sdkSummary);
     incrementalKernelGenerator = new IncrementalKernelGenerator(
@@ -68,51 +55,51 @@
   }
 
   test_incrementalUpdate_referenceToCore() async {
-    // TODO(paulberry): test parts.
     writeFiles({'/foo.dart': 'main() { print(1); }'});
-    var fileUri = Uri.parse('file:///foo.dart');
-    var initialState = await getInitialState(fileUri);
-    expect(initialState.keys, unorderedEquals([fileUri]));
-    void _checkMain(List<Library> libraries, int expectedArgument) {
-      checkLibraries(libraries, {
-        fileUri: (library) {
-          expect(library.importUri, fileUri);
-          expect(library.classes, isEmpty);
-          expect(library.procedures, hasLength(1));
-          expect(library.procedures[0].name.name, 'main');
-          var body = library.procedures[0].function.body;
-          expect(body, new isInstanceOf<Block>());
-          var block = body as Block;
-          expect(block.statements, hasLength(1));
-          expect(block.statements[0], new isInstanceOf<ExpressionStatement>());
-          var expressionStatement = block.statements[0] as ExpressionStatement;
-          expect(expressionStatement.expression,
-              new isInstanceOf<StaticInvocation>());
-          var staticInvocation =
-              expressionStatement.expression as StaticInvocation;
-          expect(staticInvocation.target.name.name, 'print');
-          expect(staticInvocation.arguments.positional, hasLength(1));
-          expect(staticInvocation.arguments.positional[0],
-              new isInstanceOf<IntLiteral>());
-          var intLiteral =
-              staticInvocation.arguments.positional[0] as IntLiteral;
-          expect(intLiteral.value, expectedArgument);
-        },
-        Uri.parse('dart:core'): (library) {
-          // Should contain the procedure "print" but not its definition.
-          expect(library.procedures, hasLength(1));
-          expect(library.procedures[0].name.name, 'print');
-          expect(library.procedures[0].function.body, isNull);
-        }
-      });
+    var fooUri = Uri.parse('file:///foo.dart');
+    var coreUri = Uri.parse('dart:core');
+    var initialState = await getInitialState(fooUri);
+    expect(initialState.keys, unorderedEquals([fooUri]));
+
+    void _checkMain(Program program, int expectedArgument) {
+      expect(_getLibraryUris(program), unorderedEquals([fooUri, coreUri]));
+      var mainStatements = _getProcedureStatements(
+          _getProcedure(_getLibrary(program, fooUri), 'main'));
+      expect(mainStatements, hasLength(1));
+      _checkPrintLiteralInt(mainStatements[0], expectedArgument);
+      var coreLibrary = _getLibrary(program, coreUri);
+      expect(coreLibrary.procedures, hasLength(1));
+      expect(coreLibrary.procedures[0].name.name, 'print');
+      expect(coreLibrary.procedures[0].function.body, isNull);
     }
 
-    _checkMain(initialState[fileUri].libraries, 1);
+    _checkMain(initialState[fooUri], 1);
     writeFiles({'/foo.dart': 'main() { print(2); }'});
     incrementalKernelGenerator.invalidateAll();
     var deltaProgram = await incrementalKernelGenerator.computeDelta();
-    expect(deltaProgram.newState.keys, unorderedEquals([fileUri]));
-    _checkMain(deltaProgram.newState[fileUri].libraries, 2);
+    expect(deltaProgram.newState.keys, unorderedEquals([fooUri]));
+    _checkMain(deltaProgram.newState[fooUri], 2);
+  }
+
+  test_part() async {
+    writeFiles({
+      '/foo.dart': 'library foo; part "bar.dart"; main() { print(1); f(); }',
+      '/bar.dart': 'part of foo; f() { print(2); }'
+    });
+    var fooUri = Uri.parse('file:///foo.dart');
+    var initialState = await getInitialState(fooUri);
+    expect(initialState.keys, unorderedEquals([fooUri]));
+    var library = _getLibrary(initialState[fooUri], fooUri);
+    var mainStatements =
+        _getProcedureStatements(_getProcedure(library, 'main'));
+    var fProcedure = _getProcedure(library, 'f');
+    var fStatements = _getProcedureStatements(fProcedure);
+    expect(mainStatements, hasLength(2));
+    _checkPrintLiteralInt(mainStatements[0], 1);
+    _checkFunctionCall(mainStatements[1], fProcedure);
+    expect(fStatements, hasLength(1));
+    _checkPrintLiteralInt(fStatements[0], 2);
+    // TODO(paulberry): now test incremental updates
   }
 
   /// Write the given file contents to the virtual filesystem.
@@ -123,4 +110,50 @@
           .writeAsStringSync(text);
     });
   }
+
+  void _checkFunctionCall(Statement statement, Procedure expectedTarget) {
+    expect(statement, new isInstanceOf<ExpressionStatement>());
+    var expressionStatement = statement as ExpressionStatement;
+    expect(
+        expressionStatement.expression, new isInstanceOf<StaticInvocation>());
+    var staticInvocation = expressionStatement.expression as StaticInvocation;
+    expect(staticInvocation.target, same(expectedTarget));
+  }
+
+  void _checkPrintLiteralInt(Statement statement, int expectedArgument) {
+    expect(statement, new isInstanceOf<ExpressionStatement>());
+    var expressionStatement = statement as ExpressionStatement;
+    expect(
+        expressionStatement.expression, new isInstanceOf<StaticInvocation>());
+    var staticInvocation = expressionStatement.expression as StaticInvocation;
+    expect(staticInvocation.target.name.name, 'print');
+    expect(staticInvocation.arguments.positional, hasLength(1));
+    expect(staticInvocation.arguments.positional[0],
+        new isInstanceOf<IntLiteral>());
+    var intLiteral = staticInvocation.arguments.positional[0] as IntLiteral;
+    expect(intLiteral.value, expectedArgument);
+  }
+
+  Library _getLibrary(Program program, Uri uri) {
+    for (var library in program.libraries) {
+      if (library.importUri == uri) return library;
+    }
+    throw fail('No library found with URI "$uri"');
+  }
+
+  List<Uri> _getLibraryUris(Program program) =>
+      program.libraries.map((library) => library.importUri).toList();
+
+  Procedure _getProcedure(Library library, String name) {
+    for (var procedure in library.procedures) {
+      if (procedure.name.name == name) return procedure;
+    }
+    throw fail('No function declaration found with name "$name"');
+  }
+
+  List<Statement> _getProcedureStatements(Procedure procedure) {
+    var body = procedure.function.body;
+    expect(body, new isInstanceOf<Block>());
+    return (body as Block).statements;
+  }
 }
diff --git a/pkg/front_end/test/incremental_resolved_ast_generator_test.dart b/pkg/front_end/test/incremental_resolved_ast_generator_test.dart
index 3478835..553c9f3 100644
--- a/pkg/front_end/test/incremental_resolved_ast_generator_test.dart
+++ b/pkg/front_end/test/incremental_resolved_ast_generator_test.dart
@@ -6,6 +6,7 @@
 
 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/file_system/physical_file_system.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:front_end/compiler_options.dart';
@@ -56,47 +57,26 @@
   }
 
   test_incrementalUpdate_referenceToCore() async {
-    // TODO(paulberry): test parts.
     writeFiles({'/foo.dart': 'main() { print(1); }'});
     var fooUri = Uri.parse('file:///foo.dart');
     var initialProgram = await getInitialProgram(fooUri);
     expect(initialProgram.keys, unorderedEquals([fooUri]));
 
     void _checkMain(CompilationUnit unit, int expectedArgument) {
-      expect(unit.declarations, hasLength(1));
-      expect(unit.declarations[0], new isInstanceOf<FunctionDeclaration>());
-      var main = unit.declarations[0] as FunctionDeclaration;
-      expect(main.name.name, 'main');
-      expect(
-          main.functionExpression.body, new isInstanceOf<BlockFunctionBody>());
-      var blockFunctionBody = main.functionExpression.body as BlockFunctionBody;
-      expect(blockFunctionBody.block.statements, hasLength(1));
-      expect(blockFunctionBody.block.statements[0],
-          new isInstanceOf<ExpressionStatement>());
-      var expressionStatement =
-          blockFunctionBody.block.statements[0] as ExpressionStatement;
-      expect(
-          expressionStatement.expression, new isInstanceOf<MethodInvocation>());
-      var methodInvocation = expressionStatement.expression as MethodInvocation;
-      expect(methodInvocation.methodName.name, 'print');
-      var printElement =
-          resolutionMap.staticElementForIdentifier(methodInvocation.methodName);
-      expect(printElement, isNotNull);
-      expect(printElement.library.source.uri, Uri.parse('dart:core'));
-      expect(methodInvocation.argumentList.arguments, hasLength(1));
-      expect(methodInvocation.argumentList.arguments[0],
-          new isInstanceOf<IntegerLiteral>());
-      var integerLiteral =
-          methodInvocation.argumentList.arguments[0] as IntegerLiteral;
-      expect(integerLiteral.value, expectedArgument);
+      var mainStatements = _getFunctionStatements(_getFunction(unit, 'main'));
+      expect(mainStatements, hasLength(1));
+      _checkPrintLiteralInt(mainStatements[0], expectedArgument);
     }
 
     _checkMain(initialProgram[fooUri].definingCompilationUnit, 1);
     writeFiles({'/foo.dart': 'main() { print(2); }'});
-    // TODO(paulberry): verify that the file isn't actually reread until
-    // invalidate is called.
-    // var deltaProgram1 = await incrementalResolvedAstGenerator.computeDelta();
+    // Verify that the file isn't actually reread until invalidate is called.
+    var deltaProgram1 = await incrementalResolvedAstGenerator.computeDelta();
+    // TODO(paulberry): since there is no delta, computeDelta should return an
+    // empty map.
     // expect(deltaProgram1.newState, isEmpty);
+    expect(deltaProgram1.newState.keys, unorderedEquals([fooUri]));
+    _checkMain(deltaProgram1.newState[fooUri].definingCompilationUnit, 1);
     incrementalResolvedAstGenerator.invalidateAll();
     var deltaProgram2 = await incrementalResolvedAstGenerator.computeDelta();
     expect(deltaProgram2.newState.keys, unorderedEquals([fooUri]));
@@ -113,6 +93,30 @@
     incrementalResolvedAstGenerator.invalidateAll();
   }
 
+  test_part() async {
+    writeFiles({
+      '/foo.dart': 'library foo; part "bar.dart"; main() { print(1); f(); }',
+      '/bar.dart': 'part of foo; f() { print(2); }'
+    });
+    var fooUri = Uri.parse('file:///foo.dart');
+    var barUri = Uri.parse('file:///bar.dart');
+    var initialProgram = await getInitialProgram(fooUri);
+    expect(initialProgram.keys, unorderedEquals([fooUri]));
+    expect(initialProgram[fooUri].partUnits.keys, unorderedEquals([barUri]));
+    var mainStatements = _getFunctionStatements(
+        _getFunction(initialProgram[fooUri].definingCompilationUnit, 'main'));
+    var fDeclaration =
+        _getFunction(initialProgram[fooUri].partUnits[barUri], 'f');
+    var fStatements = _getFunctionStatements(fDeclaration);
+    expect(mainStatements, hasLength(2));
+    _checkPrintLiteralInt(mainStatements[0], 1);
+    _checkFunctionCall(mainStatements[1],
+        resolutionMap.elementDeclaredByFunctionDeclaration(fDeclaration));
+    expect(fStatements, hasLength(1));
+    _checkPrintLiteralInt(fStatements[0], 2);
+    // TODO(paulberry): now test incremental updates
+  }
+
   /// Write the given file contents to the virtual filesystem.
   void writeFiles(Map<String, String> contents) {
     contents.forEach((path, text) {
@@ -121,4 +125,49 @@
           .writeAsStringSync(text);
     });
   }
+
+  void _checkFunctionCall(Statement statement, Element expectedTarget) {
+    expect(statement, new isInstanceOf<ExpressionStatement>());
+    var expressionStatement = statement as ExpressionStatement;
+    expect(
+        expressionStatement.expression, new isInstanceOf<MethodInvocation>());
+    var methodInvocation = expressionStatement.expression as MethodInvocation;
+    expect(
+        resolutionMap.staticElementForIdentifier(methodInvocation.methodName),
+        expectedTarget);
+  }
+
+  void _checkPrintLiteralInt(Statement statement, int expectedArgument) {
+    expect(statement, new isInstanceOf<ExpressionStatement>());
+    var expressionStatement = statement as ExpressionStatement;
+    expect(
+        expressionStatement.expression, new isInstanceOf<MethodInvocation>());
+    var methodInvocation = expressionStatement.expression as MethodInvocation;
+    expect(methodInvocation.methodName.name, 'print');
+    var printElement =
+        resolutionMap.staticElementForIdentifier(methodInvocation.methodName);
+    expect(printElement, isNotNull);
+    expect(printElement.library.source.uri, Uri.parse('dart:core'));
+    expect(methodInvocation.argumentList.arguments, hasLength(1));
+    expect(methodInvocation.argumentList.arguments[0],
+        new isInstanceOf<IntegerLiteral>());
+    var integerLiteral =
+        methodInvocation.argumentList.arguments[0] as IntegerLiteral;
+    expect(integerLiteral.value, expectedArgument);
+  }
+
+  FunctionDeclaration _getFunction(CompilationUnit unit, String name) {
+    for (var declaration in unit.declarations) {
+      if (declaration is FunctionDeclaration && declaration.name.name == name) {
+        return declaration;
+      }
+    }
+    throw fail('No function declaration found with name "$name"');
+  }
+
+  NodeList<Statement> _getFunctionStatements(FunctionDeclaration function) {
+    var body = function.functionExpression.body;
+    expect(body, new isInstanceOf<BlockFunctionBody>());
+    return (body as BlockFunctionBody).block.statements;
+  }
 }
diff --git a/pkg/front_end/test/src/base/file_repository_test.dart b/pkg/front_end/test/src/base/file_repository_test.dart
new file mode 100644
index 0000000..f6917aa
--- /dev/null
+++ b/pkg/front_end/test/src/base/file_repository_test.dart
@@ -0,0 +1,75 @@
+// 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:front_end/src/base/file_repository.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FileRepositoryTest);
+  });
+}
+
+/// Generic URI resolver tests which do not depend on the particular path
+/// context in use.
+@reflectiveTest
+class FileRepositoryTest {
+  final fileRepository = new FileRepository();
+
+  test_clearContents() {
+    var uri = Uri.parse('file:///foo/bar.dart');
+    fileRepository.store(uri, 'contents1');
+    expect(fileRepository.getContentsForTesting(), isNotEmpty);
+    fileRepository.clearContents();
+    expect(fileRepository.getContentsForTesting(), isEmpty);
+  }
+
+  test_contentsForPath() {
+    var path1 =
+        fileRepository.store(Uri.parse('file:///foo/bar.dart'), 'contents1');
+    var path2 =
+        fileRepository.store(Uri.parse('package:foo/bar.dart'), 'contents2');
+    expect(fileRepository.contentsForPath(path1), 'contents1');
+    expect(fileRepository.contentsForPath(path2), 'contents2');
+  }
+
+  test_pathForUri() {
+    var uri1 = Uri.parse('file:///foo/bar.dart');
+    var path1 = fileRepository.store(uri1, 'contents1');
+    var uri2 = Uri.parse('package:foo/bar.dart');
+    var path2 = fileRepository.store(uri2, 'contents2');
+    expect(fileRepository.pathForUri(uri1), path1);
+    expect(fileRepository.pathForUri(uri2), path2);
+  }
+
+  test_pathForUri_allocate() {
+    var uri1 = Uri.parse('file:///foo/bar.dart');
+    var path1 = fileRepository.pathForUri(uri1, allocate: true);
+    var uri2 = Uri.parse('package:foo/bar.dart');
+    var path2 = fileRepository.pathForUri(uri2, allocate: true);
+    expect(fileRepository.store(uri1, 'contents1'), path1);
+    expect(fileRepository.store(uri2, 'contents2'), path2);
+  }
+
+  test_store() {
+    var uri = Uri.parse('file:///foo/bar.dart');
+    var path = fileRepository.store(uri, 'contents1');
+    expect(path, endsWith('.dart'));
+    expect(fileRepository.contentsForPath(path), 'contents1');
+    expect(fileRepository.getContentsForTesting(), {path: 'contents1'});
+    expect(fileRepository.store(uri, 'contents2'), path);
+    expect(fileRepository.contentsForPath(path), 'contents2');
+    expect(fileRepository.getContentsForTesting(), {path: 'contents2'});
+  }
+
+  test_uriForPath() {
+    var uri1 = Uri.parse('file:///foo/bar.dart');
+    var path1 = fileRepository.store(uri1, 'contents1');
+    var uri2 = Uri.parse('package:foo/bar.dart');
+    var path2 = fileRepository.store(uri2, 'contents2');
+    expect(fileRepository.uriForPath(path1), uri1);
+    expect(fileRepository.uriForPath(path2), uri2);
+  }
+}
diff --git a/pkg/kernel/lib/analyzer/ast_from_analyzer.dart b/pkg/kernel/lib/analyzer/ast_from_analyzer.dart
index 034decd..06e0f5e 100644
--- a/pkg/kernel/lib/analyzer/ast_from_analyzer.dart
+++ b/pkg/kernel/lib/analyzer/ast_from_analyzer.dart
@@ -754,11 +754,14 @@
     return new ast.Throw(new ast.StringLiteral(message));
   }
 
+  ast.Expression buildThrowCompileTimeErrorFromCode(ErrorCode code,
+      [List arguments]) {
+    return buildThrowCompileTimeError(makeErrorMessage(code, arguments));
+  }
+
   static final RegExp _errorMessagePattern = new RegExp(r'\{(\d+)\}');
 
-  /// Throws an exception that will be caught at the function level, to replace
-  /// the entire function with a throw.
-  emitCompileTimeError(ErrorCode error, [List arguments]) {
+  String makeErrorMessage(ErrorCode error, [List arguments]) {
     String message = error.message;
     if (arguments != null) {
       message = message.replaceAllMapped(_errorMessagePattern, (m) {
@@ -767,7 +770,13 @@
         return arguments[index];
       });
     }
-    throw new _CompilationError(message);
+    return message;
+  }
+
+  /// Throws an exception that will be caught at the function level, to replace
+  /// the entire function with a throw.
+  emitCompileTimeError(ErrorCode error, [List arguments]) {
+    throw new _CompilationError(makeErrorMessage(error, arguments));
   }
 
   ast.Expression buildThrowAbstractClassInstantiationError(String name) {
@@ -1693,6 +1702,9 @@
         if (isTopLevelFunction(function)) {
           return scope.staticAccess(node.name, function);
         }
+        if (function == function.library.loadLibraryFunction) {
+          return scope.unsupportedFeature('Deferred loading');
+        }
         return new VariableAccessor(scope.getVariableReference(function));
 
       case ElementKind.LOCAL_VARIABLE:
@@ -2726,6 +2738,10 @@
   }
 
   void buildGenerativeConstructor(ConstructorDeclaration node) {
+    if (currentMember is! ast.Constructor) {
+      buildBrokenMember();
+      return;
+    }
     addAnnotations(node.metadata);
     ast.Constructor constructor = currentMember;
     constructor.function = scope.buildFunctionNode(node.parameters, node.body,
@@ -2737,9 +2753,18 @@
     }
     for (var parameter in node.parameters.parameterElements) {
       if (parameter is FieldFormalParameterElement) {
-        var initializer = new ast.FieldInitializer(
-            scope.getMemberReference(parameter.field),
-            new ast.VariableGet(scope.getVariableReference(parameter)));
+        ast.Initializer initializer;
+        if (parameter.field == null) {
+          initializer = new ast.LocalInitializer(
+              new ast.VariableDeclaration.forValue(scope
+                  .buildThrowCompileTimeErrorFromCode(
+                      CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD,
+                      [parameter.name])));
+        } else {
+          initializer = new ast.FieldInitializer(
+              scope.getMemberReference(parameter.field),
+              new ast.VariableGet(scope.getVariableReference(parameter)));
+        }
         constructor.initializers.add(initializer..parent = constructor);
       }
     }
@@ -2769,6 +2794,10 @@
   }
 
   void buildFactoryConstructor(ConstructorDeclaration node) {
+    if (currentMember is! ast.Procedure) {
+      buildBrokenMember();
+      return;
+    }
     addAnnotations(node.metadata);
     ast.Procedure procedure = currentMember;
     ClassElement classElement = resolutionMap
diff --git a/pkg/kernel/lib/analyzer/loader.dart b/pkg/kernel/lib/analyzer/loader.dart
index cb5c9c6..d3743af 100644
--- a/pkg/kernel/lib/analyzer/loader.dart
+++ b/pkg/kernel/lib/analyzer/loader.dart
@@ -109,7 +109,8 @@
 
   DartLoader(this.repository, DartOptions options, Packages packages,
       {DartSdk dartSdk, AnalysisContext context})
-      : this.context = context ?? createContext(options, packages, dartSdk: dartSdk),
+      : this.context =
+            context ?? createContext(options, packages, dartSdk: dartSdk),
         this.applicationRoot = options.applicationRoot;
 
   String getLibraryName(LibraryElement element) {
@@ -401,11 +402,13 @@
   }
 
   ast.Member getMemberReference(Element element) {
+    assert(element != null);
     assert(element is! Member); // Use the "base element".
     return _members[element] ??= _buildMemberReference(element);
   }
 
   ast.Member _buildMemberReference(Element element) {
+    assert(element != null);
     var node = _buildOrphanedMemberReference(element);
     // Set the parent pointer and store it in the enclosing class or library.
     // If the enclosing library is being built from the AST, do not add the
@@ -428,6 +431,7 @@
   }
 
   ast.Member _buildOrphanedMemberReference(Element element) {
+    assert(element != null);
     ClassElement classElement = element.enclosingElement is ClassElement
         ? element.enclosingElement
         : null;
@@ -685,15 +689,42 @@
     }
   }
 
+  ast.Procedure _getMainMethod(Uri uri) {
+    Source source = context.sourceFactory.forUri2(uri);
+    LibraryElement library = context.computeLibraryElement(source);
+    var mainElement = library.entryPoint;
+    if (mainElement == null) return null;
+    var mainMember = getMemberReference(mainElement);
+    if (mainMember is ast.Procedure && !mainMember.isAccessor) {
+      return mainMember;
+    }
+    // Top-level 'main' getters are not supported at the moment.
+    return null;
+  }
+
+  ast.Procedure _makeMissingMainMethod(ast.Library library) {
+    var main = new ast.Procedure(
+        new ast.Name('main'),
+        ast.ProcedureKind.Method,
+        new ast.FunctionNode(new ast.ExpressionStatement(new ast.Throw(
+            new ast.StringLiteral('Program has no main method')))),
+        isStatic: true)
+      ..fileUri = library.fileUri;
+    library.addMember(main);
+    return main;
+  }
+
   ast.Program loadProgram(Uri mainLibrary, {Target target, bool compileSdk}) {
-    ast.Library library = repository
-        .getLibraryReference(applicationRoot.relativeUri(mainLibrary));
+    Uri uri = applicationRoot.relativeUri(mainLibrary);
+    ast.Library library = repository.getLibraryReference(uri);
     ensureLibraryIsLoaded(library);
+    var mainMethod = _getMainMethod(mainLibrary);
     loadEverything(target: target, compileSdk: compileSdk);
     var program = new ast.Program(repository.libraries);
-    program.mainMethod = library.procedures.firstWhere(
-        (member) => member.name?.name == 'main',
-        orElse: () => null);
+    if (mainMethod == null) {
+      mainMethod = _makeMissingMainMethod(library);
+    }
+    program.mainMethod = mainMethod;
     for (LibraryElement libraryElement in libraryElements) {
       for (CompilationUnitElement compilationUnitElement
           in libraryElement.units) {
diff --git a/pkg/kernel/lib/class_hierarchy.dart b/pkg/kernel/lib/class_hierarchy.dart
index 6771cc4..40bc6e7 100644
--- a/pkg/kernel/lib/class_hierarchy.dart
+++ b/pkg/kernel/lib/class_hierarchy.dart
@@ -234,11 +234,18 @@
 
   /// True if the program contains another class that is a subtype of given one.
   bool hasProperSubtypes(Class class_) {
-    var info = _infoFor[class_];
-    var subtypes = info.subtypeIntervalList;
-    return !(subtypes.length == 2 &&
-        subtypes[0] == info.topDownIndex &&
-        subtypes[1] == info.topDownIndex + 1);
+    // If there are no subtypes then the subtype set contains the class itself.
+    return !getSubtypesOf(class_).isSingleton;
+  }
+
+  /// Returns the subtypes of [class_] as an interval list.
+  ClassSet getSubtypesOf(Class class_) {
+    return new ClassSet(this, _infoFor[class_].subtypeIntervalList);
+  }
+
+  /// Returns the subclasses of [class_] as an interval list.
+  ClassSet getSubclassesOf(Class class_) {
+    return new ClassSet(this, _infoFor[class_].subclassIntervalList);
   }
 
   ClassHierarchy._internal(Program program, int numberOfClasses)
@@ -864,3 +871,32 @@
 
   _ClassInfo(this.classNode);
 }
+
+/// An immutable set of classes, internally represented as an interval list.
+class ClassSet {
+  final ClassHierarchy _hierarchy;
+  final Uint32List _intervalList;
+
+  ClassSet(this._hierarchy, this._intervalList);
+
+  bool get isEmpty => _intervalList.isEmpty;
+
+  bool get isSingleton {
+    var list = _intervalList;
+    return list.length == 2 && list[0] + 1 == list[1];
+  }
+
+  bool contains(Class class_) {
+    return _intervalListContains(
+        _intervalList, _hierarchy._infoFor[class_].topDownIndex);
+  }
+
+  ClassSet union(ClassSet other) {
+    assert(_hierarchy == other._hierarchy);
+    if (identical(_intervalList, other._intervalList)) return this;
+    _IntervalListBuilder builder = new _IntervalListBuilder();
+    builder.addIntervalList(_intervalList);
+    builder.addIntervalList(other._intervalList);
+    return new ClassSet(_hierarchy, builder.buildIntervalList());
+  }
+}
diff --git a/pkg/kernel/lib/core_types.dart b/pkg/kernel/lib/core_types.dart
index 790b3fd..28ce858 100644
--- a/pkg/kernel/lib/core_types.dart
+++ b/pkg/kernel/lib/core_types.dart
@@ -25,8 +25,9 @@
   Class internalSymbolClass;
   Class typeClass;
   Class functionClass;
+  Class invocationClass;
 
-  Library getCoreLibrary(String uri) => _dartLibraries[uri].library;
+  Library getCoreLibrary(String uri) => _dartLibraries[uri]?.library;
 
   Class getCoreClass(String libraryUri, String className) {
     return _dartLibraries[libraryUri].require(className);
@@ -63,6 +64,7 @@
     symbolClass = dartCore.require('Symbol');
     typeClass = dartCore.require('Type');
     functionClass = dartCore.require('Function');
+    invocationClass = dartCore.require('Invocation');
     futureClass = dartAsync.require('Future');
     streamClass = dartAsync.require('Stream');
     internalSymbolClass = dartInternal.require('Symbol');
diff --git a/pkg/kernel/lib/target/vm.dart b/pkg/kernel/lib/target/vm.dart
index 58c229d..c12403e 100644
--- a/pkg/kernel/lib/target/vm.dart
+++ b/pkg/kernel/lib/target/vm.dart
@@ -12,6 +12,7 @@
 import '../transformations/mixin_full_resolution.dart' as mix;
 import '../transformations/sanitize_for_vm.dart';
 import '../transformations/setup_builtin_library.dart' as setup_builtin_library;
+import '../transformations/treeshaker.dart';
 import 'targets.dart';
 
 /// Specializes the kernel IR to the Dart VM.
@@ -57,15 +58,20 @@
     var mixins = new mix.MixinFullResolution();
     mixins.transform(program);
 
+    var hierarchy = mixins.hierarchy;
+    var coreTypes = new CoreTypes(program);
+
     if (strongMode) {
-      var hierarchy = mixins.hierarchy;
-      var coreTypes = new CoreTypes(program);
       new InsertTypeChecks(hierarchy: hierarchy, coreTypes: coreTypes)
           .transformProgram(program);
       new InsertCovarianceChecks(hierarchy: hierarchy, coreTypes: coreTypes)
           .transformProgram(program);
     }
 
+    new TreeShaker(program,
+            hierarchy: hierarchy, coreTypes: coreTypes, strongMode: strongMode)
+        .transform(program);
+
     cont.transformProgram(program);
 
     // Repair `_getMainClosure()` function in dart:_builtin.
diff --git a/pkg/kernel/lib/transformations/closure/converter.dart b/pkg/kernel/lib/transformations/closure/converter.dart
index 8f40b7c..91a36df 100644
--- a/pkg/kernel/lib/transformations/closure/converter.dart
+++ b/pkg/kernel/lib/transformations/closure/converter.dart
@@ -147,7 +147,7 @@
     if (currentMember is Constructor) return currentClass.fileUri;
     if (currentMember is Field) return (currentMember as Field).fileUri;
     if (currentMember is Procedure) return (currentMember as Procedure).fileUri;
-    throw "No file uri";
+    throw "No file uri for ${currentMember.runtimeType}";
   }
 
   void insert(Statement statement) {
@@ -171,6 +171,7 @@
   TreeNode visitLibrary(Library node) {
     assert(newLibraryMembers.isEmpty);
     if (node == contextClass.enclosingLibrary) return node;
+
     currentLibrary = node;
     node = super.visitLibrary(node);
     for (TreeNode member in newLibraryMembers) {
@@ -196,7 +197,22 @@
   }
 
   TreeNode visitConstructor(Constructor node) {
-    // TODO(ahe): Convert closures in constructors as well.
+    assert(isEmptyContext);
+
+    currentMember = node;
+
+    FunctionNode function = node.function;
+    if (function.body != null && function.body is! EmptyStatement) {
+      setupContextForFunctionBody(function);
+      VariableDeclaration self = thisAccess[currentMemberFunction];
+      // TODO(karlklose): transform initializers
+      if (self != null) {
+        context.extend(self, new ThisExpression());
+      }
+      node.function.accept(this);
+      resetContext();
+    }
+
     return node;
   }
 
@@ -341,12 +357,9 @@
   }
 
   TreeNode visitProcedure(Procedure node) {
-    currentMember = node;
-    assert(_currentBlock == null);
-    assert(_insertionIndex == 0);
-    assert(context == null);
+    assert(isEmptyContext);
 
-    Statement body = node.function.body;
+    currentMember = node;
 
     if (node.isInstanceMember) {
       Name tearOffName = tearOffGetterNames[node.name];
@@ -362,36 +375,47 @@
       }
     }
 
-    if (body == null) return node;
+    FunctionNode function = node.function;
+    if (function.body != null) {
+      setupContextForFunctionBody(function);
+      VariableDeclaration self = thisAccess[currentMemberFunction];
+      if (self != null) {
+        context.extend(self, new ThisExpression());
+      }
+      node.transformChildren(this);
+      resetContext();
+    }
 
-    currentMemberFunction = node.function;
+    return node;
+  }
 
+  void setupContextForFunctionBody(FunctionNode function) {
+    Statement body = function.body;
+    assert(body != null);
+    currentMemberFunction = function;
     // Ensure that the body is a block which becomes the current block.
     if (body is Block) {
       _currentBlock = body;
     } else {
       _currentBlock = new Block(<Statement>[body]);
-      node.function.body = body.parent = _currentBlock;
+      function.body = body.parent = _currentBlock;
     }
     _insertionIndex = 0;
-
     // Start with no context.  This happens after setting up _currentBlock
     // so statements can be emitted into _currentBlock if necessary.
     context = new NoContext(this);
+  }
 
-    VariableDeclaration self = thisAccess[currentMemberFunction];
-    if (self != null) {
-      context.extend(self, new ThisExpression());
-    }
-
-    node.transformChildren(this);
-
+  void resetContext() {
     _currentBlock = null;
     _insertionIndex = 0;
     context = null;
     currentMemberFunction = null;
     currentMember = null;
-    return node;
+  }
+
+  bool get isEmptyContext {
+    return _currentBlock == null && _insertionIndex == 0 && context == null;
   }
 
   TreeNode visitLocalInitializer(LocalInitializer node) {
@@ -418,28 +442,30 @@
     return node;
   }
 
-  TreeNode visitBlock(Block node) => saveContext(() {
-        if (_currentBlock != node) {
-          _currentBlock = node;
-          _insertionIndex = 0;
+  TreeNode visitBlock(Block node) {
+    return saveContext(() {
+      if (_currentBlock != node) {
+        _currentBlock = node;
+        _insertionIndex = 0;
+      }
+
+      while (_insertionIndex < _currentBlock.statements.length) {
+        assert(_currentBlock == node);
+
+        var original = _currentBlock.statements[_insertionIndex];
+        var transformed = original.accept(this);
+        assert(_currentBlock.statements[_insertionIndex] == original);
+        if (transformed == null) {
+          _currentBlock.statements.removeAt(_insertionIndex);
+        } else {
+          _currentBlock.statements[_insertionIndex++] = transformed;
+          transformed.parent = _currentBlock;
         }
+      }
 
-        while (_insertionIndex < _currentBlock.statements.length) {
-          assert(_currentBlock == node);
-
-          var original = _currentBlock.statements[_insertionIndex];
-          var transformed = original.accept(this);
-          assert(_currentBlock.statements[_insertionIndex] == original);
-          if (transformed == null) {
-            _currentBlock.statements.removeAt(_insertionIndex);
-          } else {
-            _currentBlock.statements[_insertionIndex++] = transformed;
-            transformed.parent = _currentBlock;
-          }
-        }
-
-        return node;
-      });
+      return node;
+    });
+  }
 
   TreeNode visitVariableDeclaration(VariableDeclaration node) {
     node.transformChildren(this);
@@ -447,14 +473,14 @@
     if (!capturedVariables.contains(node)) return node;
     context.extend(node, node.initializer ?? new NullLiteral());
 
-    if (node.parent == currentFunction) return node;
-    if (node.parent is Block) {
+    if (node.parent == currentFunction) {
+      return node;
+    } else {
+      assert(node.parent is Block);
       // When returning null, the parent block will remove this node from its
       // list of statements.
-      // TODO(ahe): I'd like to avoid testing on the parent pointer.
       return null;
     }
-    throw "Unexpected parent for $node: ${node.parent.parent}";
   }
 
   TreeNode visitVariableGet(VariableGet node) {
diff --git a/pkg/kernel/lib/transformations/closure/invalidate_closures.dart b/pkg/kernel/lib/transformations/closure/invalidate_closures.dart
new file mode 100644
index 0000000..96e281e
--- /dev/null
+++ b/pkg/kernel/lib/transformations/closure/invalidate_closures.dart
@@ -0,0 +1,26 @@
+// 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 kernel.transformations.closure.invalidate;
+
+import '../../ast.dart';
+
+class InvalidateClosures extends Transformer {
+  FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) {
+    invalidate(node.function);
+    return node;
+  }
+
+  FunctionExpression visitFunctionExpression(FunctionExpression node) {
+    invalidate(node.function);
+    return node;
+  }
+
+  void invalidate(FunctionNode function) {
+    var position = function.location;
+    function.body = new ExpressionStatement(new Throw(
+        new StringLiteral("Calling unconverted closure at $position")))
+      ..parent = function;
+  }
+}
diff --git a/pkg/kernel/lib/transformations/closure_conversion.dart b/pkg/kernel/lib/transformations/closure_conversion.dart
index 6f19786..44ae828 100644
--- a/pkg/kernel/lib/transformations/closure_conversion.dart
+++ b/pkg/kernel/lib/transformations/closure_conversion.dart
@@ -12,6 +12,7 @@
 
 import 'closure/info.dart' show ClosureInfo;
 
+import 'closure/invalidate_closures.dart';
 import 'closure/mock.dart' show mockUpContext;
 
 Program transformProgram(Program program) {
@@ -21,5 +22,6 @@
   CoreTypes coreTypes = new CoreTypes(program);
   Class contextClass = mockUpContext(coreTypes, program);
   var convert = new ClosureConverter(coreTypes, info, contextClass);
-  return convert.visitProgram(program);
+  program = convert.visitProgram(program);
+  return new InvalidateClosures().visitProgram(program);
 }
diff --git a/pkg/kernel/lib/transformations/treeshaker.dart b/pkg/kernel/lib/transformations/treeshaker.dart
index bd33595..90540a0 100644
--- a/pkg/kernel/lib/transformations/treeshaker.dart
+++ b/pkg/kernel/lib/transformations/treeshaker.dart
@@ -7,6 +7,7 @@
 import '../ast.dart';
 import '../class_hierarchy.dart';
 import '../core_types.dart';
+import '../type_environment.dart';
 
 Program transformProgram(Program program) {
   new TreeShaker(program).transform(program);
@@ -27,7 +28,7 @@
 /// - for each member, a set of potential host classes
 /// - a set of names used in dynamic dispatch not on `this`
 ///
-/// The `dart:mirrors` library is not supported.
+/// If the `dart:mirrors` library is used then nothing will be tree-shaken.
 //
 // TODO(asgerf): Shake off parts of the core libraries based on the Target.
 // TODO(asgerf): Tree shake unused instance fields.
@@ -35,10 +36,19 @@
   final Program program;
   final ClassHierarchy hierarchy;
   final CoreTypes coreTypes;
+  final bool strongMode;
 
-  /// Names used in a dynamic dispatch invocation that could not be resolved
-  /// to a concrete target (i.e. not on `this`).
-  final Set<Name> _dispatchedNames = new Set<Name>();
+  /// Map from classes to set of names that have been dispatched with that class
+  /// as the static receiver type (meaning any subtype of that class can be
+  /// the potential concrete receiver).
+  ///
+  /// The map is implemented as a list, indexed by
+  /// [ClassHierarchy.getClassIndex].
+  final List<Set<Name>> _dispatchedNames;
+
+  /// Map from names to the set of classes that might be the concrete receiver
+  /// of a call with the given name.
+  final Map<Name, ClassSet> _receiversOfName = <Name, ClassSet>{};
 
   /// Instance members that are potential targets for dynamic dispatch, but
   /// whose name has not yet been seen in a dynamic dispatch invocation.
@@ -77,20 +87,41 @@
   /// Classes whose interface can be used by external code to invoke user code.
   final Set<Class> _escapedClasses = new Set<Class>();
 
+  /// Members that have been overridden by a member whose concrete body is
+  /// needed.  These must be preserved in order to maintain interface targets
+  /// for typed calls.
+  final Set<Member> _overriddenMembers = new Set<Member>();
+
+  final List<Expression> _typedCalls = <Expression>[];
+
   /// AST visitor for finding static uses and dynamic dispatches in code.
   _TreeShakerVisitor _visitor;
 
   /// AST visitor for analyzing type annotations on external members.
   _ExternalTypeVisitor _covariantVisitor;
   _ExternalTypeVisitor _contravariantVisitor;
-  _ExternalTypeVisitor _bivariantVisitor;
+  _ExternalTypeVisitor _invariantVisitor;
 
-  TreeShaker(Program program, {ClassHierarchy hierarchy, CoreTypes coreTypes})
+  Library _mirrorsLibrary;
+
+  /// Set to true if any use of the `dart:mirrors` API is found.
+  bool isUsingMirrors = false;
+
+  TreeShaker(Program program,
+      {ClassHierarchy hierarchy, CoreTypes coreTypes, bool strongMode: false})
       : this._internal(program, hierarchy ?? new ClassHierarchy(program),
-            coreTypes ?? new CoreTypes(program));
+            coreTypes ?? new CoreTypes(program), strongMode);
+
+  bool isMemberBodyUsed(Member member) {
+    return _usedMembers.containsKey(member);
+  }
+
+  bool isMemberOverridden(Member member) {
+    return _overriddenMembers.contains(member);
+  }
 
   bool isMemberUsed(Member member) {
-    return _usedMembers.containsKey(member);
+    return isMemberBodyUsed(member) || isMemberOverridden(member);
   }
 
   bool isInstantiated(Class classNode) {
@@ -110,11 +141,14 @@
   ///
   /// This removes unused classes, members, and hierarchy data.
   void transform(Program program) {
+    if (isUsingMirrors) return; // Give up if using mirrors.
     new _TreeShakingTransformer(this).transform(program);
   }
 
-  TreeShaker._internal(this.program, ClassHierarchy hierarchy, this.coreTypes)
+  TreeShaker._internal(
+      this.program, ClassHierarchy hierarchy, this.coreTypes, this.strongMode)
       : this.hierarchy = hierarchy,
+        this._dispatchedNames = new List<Set<Name>>(hierarchy.classes.length),
         this._usedMembersWithHost =
             new List<Set<Member>>(hierarchy.classes.length),
         this._classRetention = new List<ClassRetention>.filled(
@@ -123,9 +157,14 @@
     _covariantVisitor = new _ExternalTypeVisitor(this, isCovariant: true);
     _contravariantVisitor =
         new _ExternalTypeVisitor(this, isContravariant: true);
-    _bivariantVisitor = new _ExternalTypeVisitor(this,
+    _invariantVisitor = new _ExternalTypeVisitor(this,
         isCovariant: true, isContravariant: true);
-    _build();
+    _mirrorsLibrary = coreTypes.getCoreLibrary('dart:mirrors');
+    try {
+      _build();
+    } on _UsingMirrorsException {
+      isUsingMirrors = true;
+    }
   }
 
   void _build() {
@@ -137,10 +176,32 @@
       _addInstantiatedExternalSubclass(coreTypes.listClass);
       _addInstantiatedExternalSubclass(coreTypes.stringClass);
     }
-    _addDispatchedName(new Name('noSuchMethod'));
+    _addDispatchedName(hierarchy.rootClass, new Name('noSuchMethod'));
     _addPervasiveUses();
     _addUsedMember(null, program.mainMethod);
     _iterateWorklist();
+
+    // Mark overridden members in order to preserve abstract members as
+    // necessary.
+    if (strongMode) {
+      for (int i = hierarchy.classes.length - 1; i >= 0; --i) {
+        Class class_ = hierarchy.classes[i];
+        if (isHierarchyUsed(class_)) {
+          hierarchy.forEachOverridePair(class_,
+              (Member ownMember, Member superMember, bool isSetter) {
+            if (isMemberBodyUsed(ownMember) ||
+                _overriddenMembers.contains(ownMember)) {
+              _overriddenMembers.add(superMember);
+              // Ensure the types mentioned in the member can be preserved.
+              _visitor.visitMemberInterface(superMember);
+            }
+          });
+        }
+      }
+      // Marking members as overridden should not cause new code to become
+      // reachable.
+      assert(_worklist.isEmpty);
+    }
   }
 
   /// Registers some extremely commonly used core classes as instantiated, so
@@ -150,26 +211,53 @@
     _addInstantiatedExternalSubclass(coreTypes.intClass);
     _addInstantiatedExternalSubclass(coreTypes.boolClass);
     _addInstantiatedExternalSubclass(coreTypes.nullClass);
+    _addInstantiatedExternalSubclass(coreTypes.functionClass);
+    _addInstantiatedExternalSubclass(coreTypes.invocationClass);
   }
 
   /// Registers the given name as seen in a dynamic dispatch, and discovers used
   /// instance members accordingly.
-  void _addDispatchedName(Name name) {
+  void _addDispatchedName(Class receiver, Name name) {
+    int index = hierarchy.getClassIndex(receiver);
+    Set<Name> receiverNames = _dispatchedNames[index] ??= new Set<Name>();
     // TODO(asgerf): make use of selector arity and getter/setter kind
-    if (_dispatchedNames.add(name)) {
-      List<TreeNode> targets = _dispatchTargetCandidates[name];
-      if (targets != null) {
-        for (int i = 0; i < targets.length; i += 2) {
-          _addUsedMember(targets[i], targets[i + 1]);
+    if (receiverNames.add(name)) {
+      List<TreeNode> candidates = _dispatchTargetCandidates[name];
+      if (candidates != null) {
+        for (int i = 0; i < candidates.length; i += 2) {
+          Class host = candidates[i];
+          if (hierarchy.isSubtypeOf(host, receiver)) {
+            // This (host, member) pair is a potential target of the dispatch.
+            Member member = candidates[i + 1];
+
+            // Remove the (host,member) pair from the candidate list.
+            // Move the last pair into the current index and shrink the list.
+            int lastPair = candidates.length - 2;
+            candidates[i] = candidates[lastPair];
+            candidates[i + 1] = candidates[lastPair + 1];
+            candidates.length -= 2;
+            i -= 2; // Revisit the same index now that it has been updated.
+
+            // Mark the pair as used.  This should be done after removing it
+            // from the candidate list, since this call may recursively scan
+            // for more used members.
+            _addUsedMember(host, member);
+          }
         }
       }
+      var subtypes = hierarchy.getSubtypesOf(receiver);
+      var receiverSet = _receiversOfName[name];
+      _receiversOfName[name] = receiverSet == null
+          ? subtypes
+          : _receiversOfName[name].union(subtypes);
     }
   }
 
   /// Registers the given method as a potential target of dynamic dispatch on
   /// the given class.
   void _addDispatchTarget(Class host, Member member) {
-    if (_dispatchedNames.contains(member.name)) {
+    ClassSet receivers = _receiversOfName[member.name];
+    if (receivers != null && receivers.contains(host)) {
       _addUsedMember(host, member);
     } else {
       _dispatchTargetCandidates.putIfAbsent(member.name, _makeTreeNodeList)
@@ -213,6 +301,11 @@
       } else {
         _addCallToExternalProcedure(member);
       }
+      _addDispatchTarget(classNode, member);
+    }
+    for (Member member
+        in hierarchy.getInterfaceMembers(classNode, setters: true)) {
+      _addDispatchTarget(classNode, member);
     }
   }
 
@@ -307,6 +400,9 @@
   ///   the initializer list of another constructor.
   /// - Procedures are used if they can be invoked or torn off.
   void _addUsedMember(Class host, Member member) {
+    if (member.enclosingLibrary == _mirrorsLibrary) {
+      throw new _UsingMirrorsException();
+    }
     if (host != null) {
       // Check if the member has been seen with this host before.
       int index = hierarchy.getClassIndex(host);
@@ -349,7 +445,7 @@
     if (!_escapedClasses.add(node)) return;
     for (Member member in hierarchy.getInterfaceMembers(node)) {
       if (member is Procedure) {
-        _addDispatchedName(member.name);
+        _addDispatchedName(node, member.name);
       }
     }
   }
@@ -418,15 +514,47 @@
 class _TreeShakerVisitor extends RecursiveVisitor {
   final TreeShaker shaker;
   final CoreTypes coreTypes;
+  final TypeEnvironment types;
+  final bool strongMode;
   List<Node> summary;
 
   _TreeShakerVisitor(TreeShaker shaker)
       : this.shaker = shaker,
-        this.coreTypes = shaker.coreTypes;
+        this.coreTypes = shaker.coreTypes,
+        this.strongMode = shaker.strongMode,
+        this.types = new TypeEnvironment(shaker.coreTypes, shaker.hierarchy) {
+    types.errorHandler = handleError;
+  }
 
-  void analyzeAndBuildSummary(Node node, List<Node> summary) {
+  void handleError(TreeNode node, String message) {
+    print('[error] $message (${node.location})');
+  }
+
+  void analyzeAndBuildSummary(Member member, List<Node> summary) {
     this.summary = summary;
-    node.accept(this);
+    types.thisType = member.enclosingClass?.thisType;
+    member.accept(this);
+  }
+
+  void visitMemberInterface(Member node) {
+    if (node is Field) {
+      node.type.accept(this);
+    } else if (node is Procedure) {
+      visitFunctionInterface(node.function);
+    }
+  }
+
+  visitFunctionInterface(FunctionNode node) {
+    for (var parameter in node.typeParameters) {
+      parameter.bound.accept(this);
+    }
+    for (var parameter in node.positionalParameters) {
+      parameter.type.accept(this);
+    }
+    for (var parameter in node.namedParameters) {
+      parameter.type.accept(this);
+    }
+    node.returnType.accept(this);
   }
 
   @override
@@ -504,12 +632,34 @@
     node.visitChildren(this);
   }
 
+  Class getKnownSupertype(DartType type) {
+    if (type is InterfaceType) {
+      return type.classNode;
+    } else if (type is TypeParameterType) {
+      return getKnownSupertype(type.parameter.bound);
+    } else if (type is FunctionType) {
+      return coreTypes.functionClass;
+    } else if (type is BottomType) {
+      return coreTypes.nullClass;
+    } else {
+      return coreTypes.objectClass;
+    }
+  }
+
+  Class getStaticType(Expression node) {
+    if (!strongMode) return coreTypes.objectClass;
+    return getKnownSupertype(node.getStaticType(types));
+  }
+
   @override
   visitMethodInvocation(MethodInvocation node) {
     if (node.receiver is ThisExpression) {
       addSelfDispatch(node.name);
     } else {
-      shaker._addDispatchedName(node.name);
+      shaker._addDispatchedName(getStaticType(node.receiver), node.name);
+      if (node.interfaceTarget != null) {
+        shaker._typedCalls.add(node);
+      }
     }
     node.visitChildren(this);
   }
@@ -551,7 +701,10 @@
     if (node.receiver is ThisExpression) {
       addSelfDispatch(node.name);
     } else {
-      shaker._addDispatchedName(node.name);
+      shaker._addDispatchedName(getStaticType(node.receiver), node.name);
+      if (node.interfaceTarget != null) {
+        shaker._typedCalls.add(node);
+      }
     }
     node.visitChildren(this);
   }
@@ -561,7 +714,10 @@
     if (node.receiver is ThisExpression) {
       addSelfDispatch(node.name, setter: true);
     } else {
-      shaker._addDispatchedName(node.name);
+      shaker._addDispatchedName(getStaticType(node.receiver), node.name);
+      if (node.interfaceTarget != null) {
+        shaker._typedCalls.add(node);
+      }
     }
     node.visitChildren(this);
   }
@@ -582,7 +738,9 @@
 
   @override
   visitStringConcatenation(StringConcatenation node) {
-    shaker._addDispatchedName(_toStringName);
+    for (var expression in node.expressions) {
+      shaker._addDispatchedName(getStaticType(expression), _toStringName);
+    }
     node.visitChildren(this);
   }
 
@@ -593,6 +751,12 @@
   }
 
   @override
+  visitSupertype(Supertype node) {
+    shaker._addClassUsedInType(node.classNode);
+    node.visitChildren(this);
+  }
+
+  @override
   visitDoubleLiteral(DoubleLiteral node) {
     shaker._addInstantiatedExternalSubclass(coreTypes.doubleClass);
   }
@@ -600,8 +764,6 @@
   @override
   visitSymbolLiteral(SymbolLiteral node) {
     shaker._addInstantiatedExternalSubclass(coreTypes.symbolClass);
-    // Note: we do not support 'dart:mirrors' right now, so nothing else needs
-    // to be done for symbols.
   }
 
   @override
@@ -640,17 +802,34 @@
 
   _TreeShakingTransformer(this.shaker);
 
+  Member _translateInterfaceTarget(Member target) {
+    return target != null && shaker.isMemberUsed(target) ? target : null;
+  }
+
   void transform(Program program) {
     for (var library in program.libraries) {
       if (library.importUri.scheme == 'dart') {
-        // As long as patching happens in the backend, we cannot shake off
-        // anything in the core libraries.
+        // The backend expects certain things to be present in the core
+        // libraries, so we currently don't shake off anything there.
         continue;
       }
       library.transformChildren(this);
       // Note: we can't shake off empty libraries yet since we don't check if
       // there are private names that use the library.
     }
+    for (Expression node in shaker._typedCalls) {
+      // We should not leave dangling references, so if the target of a typed
+      // call has been removed, we must remove the reference.  The receiver of
+      // such a call can only be null.
+      // TODO(asgerf): Rewrite to a NSM call instead of adding dynamic calls.
+      if (node is MethodInvocation) {
+        node.interfaceTarget = _translateInterfaceTarget(node.interfaceTarget);
+      } else if (node is PropertyGet) {
+        node.interfaceTarget = _translateInterfaceTarget(node.interfaceTarget);
+      } else if (node is PropertySet) {
+        node.interfaceTarget = _translateInterfaceTarget(node.interfaceTarget);
+      }
+    }
   }
 
   Class visitClass(Class node) {
@@ -665,28 +844,47 @@
         node.supertype = shaker.coreTypes.objectClass.asRawSupertype;
         node.implementedTypes.clear();
         node.typeParameters.clear();
+        node.isAbstract = true;
         // Mixin applications cannot have static members.
         assert(node.mixedInType == null);
         // Unused members will be removed below.
         break;
 
       case ClassRetention.Hierarchy:
+        node.isAbstract = true;
+        break;
+
       case ClassRetention.Instance:
       case ClassRetention.ExternalInstance:
         break;
     }
     node.transformChildren(this);
-    if (node.constructors.isEmpty && node.procedures.isEmpty) {
-      // The VM does not like classes without any members, so ensure there is
-      // always a constructor left.
-      node.addMember(new Constructor(new FunctionNode(new EmptyStatement())));
-    }
     return node;
   }
 
   Member defaultMember(Member node) {
-    if (!shaker.isMemberUsed(node)) {
-      return null; // Remove unused member.
+    if (!shaker.isMemberBodyUsed(node)) {
+      if (!shaker.isMemberOverridden(node)) {
+        return null;
+      }
+      if (node is Procedure) {
+        // Remove body of unused member.
+        if (node.enclosingClass.isAbstract) {
+          node.isAbstract = true;
+          node.function.body = null;
+        } else {
+          // If the enclosing class is not abstract, the method should still
+          // have a body even if it can never be called.
+          if (node.function.body != null) {
+            node.function.body = new ExpressionStatement(
+                new Throw(new StringLiteral('Method removed by tree-shaking')))
+              ..parent = node.function;
+          }
+        }
+        node.function.asyncMarker = AsyncMarker.Sync;
+      } else if (node is Field) {
+        node.initializer = null;
+      }
     }
     return node;
   }
@@ -720,7 +918,7 @@
 
   visitCovariant(DartType type) => type?.accept(this);
 
-  visitBivariant(DartType type) => shaker._bivariantVisitor.visit(type);
+  visitInvariant(DartType type) => shaker._invariantVisitor.visit(type);
 
   visitInvalidType(InvalidType node) {}
 
@@ -747,7 +945,7 @@
       if (isWhitelistedCovariant(node.classNode)) {
         visitCovariant(typeArgument);
       } else {
-        visitBivariant(typeArgument);
+        visitInvariant(typeArgument);
       }
     }
   }
@@ -777,3 +975,7 @@
         classNode == coreTypes.mapClass;
   }
 }
+
+/// Exception that is thrown to stop the tree shaking analysis when a use
+/// of `dart:mirrors` is found.
+class _UsingMirrorsException {}
diff --git a/pkg/kernel/test/baseline_strong_mode_test.dart b/pkg/kernel/test/baseline_strong_mode_test.dart
index a252bff..00ffcf0 100644
--- a/pkg/kernel/test/baseline_strong_mode_test.dart
+++ b/pkg/kernel/test/baseline_strong_mode_test.dart
@@ -7,6 +7,7 @@
 import 'package:kernel/transformations/insert_covariance_checks.dart';
 import 'package:kernel/transformations/insert_type_checks.dart';
 import 'package:kernel/transformations/mixin_full_resolution.dart';
+import 'package:kernel/transformations/treeshaker.dart';
 import 'package:kernel/type_checker.dart';
 import 'package:path/path.dart' as pathlib;
 
@@ -31,6 +32,8 @@
     new TestTypeChecker(
             errors, new CoreTypes(program), new ClassHierarchy(program))
         .checkProgram(program);
+    new TreeShaker(program, strongMode: true).transform(program);
+    program.accept(new TreeShakerCheck());
     return errors;
   }
 }
@@ -62,6 +65,16 @@
   }
 }
 
+class TreeShakerCheck extends RecursiveVisitor {
+  visitStringLiteral(StringLiteral node) {
+    if (node.value.toLowerCase() == 'unused') {
+      throw 'Code not tree-shaken at ${node.location}.\n'
+          'The string literal $node is used to indicate that the code is '
+          'expected to be removed by strong-mode tree shaking';
+    }
+  }
+}
+
 void main() {
   runBaselineTests('strong-mode', new StrongModeTest());
 }
diff --git a/pkg/kernel/test/treeshaker_bench.dart b/pkg/kernel/test/treeshaker_bench.dart
index 3096f99..7a83c7a 100644
--- a/pkg/kernel/test/treeshaker_bench.dart
+++ b/pkg/kernel/test/treeshaker_bench.dart
@@ -13,16 +13,18 @@
 
 import 'class_hierarchy_basic.dart';
 
-ArgParser argParser = new ArgParser()
+ArgParser argParser = new ArgParser(allowTrailingOptions: true)
   ..addFlag('basic',
       help: 'Use the basic class hierarchy implementation', negatable: false)
   ..addFlag('from-scratch',
       help: 'Rebuild class hierarchy for each tree shaking', negatable: false)
   ..addFlag('diagnose',
-      abbr: 'd', help: 'Print internal diagnostics', negatable: false);
+      abbr: 'd', help: 'Print internal diagnostics', negatable: false)
+  ..addFlag('strong',
+      help: 'Run the tree shaker in strong mode', negatable: false);
 
 String usage = '''
-Usage: treeshaker_bench [options] FILE.dart
+Usage: treeshaker_bench [options] FILE.dill
 
 Benchmark the tree shaker and the class hierarchy it depends on.
 
@@ -41,6 +43,7 @@
     exit(1);
   }
   String filename = options.rest.single;
+  bool strongMode = options['strong'];
 
   Program program = loadProgramFromBinary(filename);
 
@@ -56,7 +59,9 @@
   ClassHierarchy sharedClassHierarchy = buildClassHierarchy();
   int coldHierarchyTime = watch.elapsedMicroseconds;
   var shaker = new TreeShaker(program,
-      hierarchy: sharedClassHierarchy, coreTypes: coreTypes);
+      hierarchy: sharedClassHierarchy,
+      coreTypes: coreTypes,
+      strongMode: strongMode);
   if (options['diagnose']) {
     print(shaker.getDiagnosticString());
   }
@@ -77,7 +82,8 @@
     watch.reset();
     var hierarchy = getClassHierarchy();
     hotHierarchyTime += watch.elapsedMicroseconds;
-    new TreeShaker(program, hierarchy: hierarchy, coreTypes: coreTypes);
+    new TreeShaker(program,
+        hierarchy: hierarchy, coreTypes: coreTypes, strongMode: strongMode);
     hotTreeShakingTime += watch.elapsedMicroseconds;
   }
   hotHierarchyTime ~/= numberOfTrials;
diff --git a/pkg/kernel/test/treeshaker_dump.dart b/pkg/kernel/test/treeshaker_dump.dart
index 8d1c7f4..0a380d1 100644
--- a/pkg/kernel/test/treeshaker_dump.dart
+++ b/pkg/kernel/test/treeshaker_dump.dart
@@ -24,7 +24,8 @@
       negatable: false)
   ..addOption('output',
       help: 'The --diff files are written to the given directory instead of '
-          'the working directory');
+          'the working directory')
+  ..addFlag('strong', help: 'Run the tree shaker in strong mode');
 
 String usage = '''
 Usage: treeshaker_dump [options] FILE.dill
@@ -60,8 +61,10 @@
     exit(1);
   }
 
+  bool strong = options['strong'];
+
   Program program = loadProgramFromBinary(filename);
-  TreeShaker shaker = new TreeShaker(program);
+  TreeShaker shaker = new TreeShaker(program, strongMode: strong);
   int totalClasses = 0;
   int totalInstantiationCandidates = 0;
   int totalMembers = 0;
@@ -72,7 +75,7 @@
   void visitMember(Member member) {
     if (member.isAbstract) return; // Abstract members are not relevant.
     ++totalMembers;
-    bool isUsed = shaker.isMemberUsed(member);
+    bool isUsed = shaker.isMemberBodyUsed(member);
     if (isUsed) {
       ++usedMembers;
     }
@@ -124,7 +127,7 @@
     StringBuffer before = new StringBuffer();
     new Printer(before, syntheticNames: names).writeProgramFile(program);
     new File(beforeFile).writeAsStringSync('$before');
-    new TreeShaker(program).transform(program);
+    new TreeShaker(program, strongMode: strong).transform(program);
     StringBuffer after = new StringBuffer();
     new Printer(after, syntheticNames: names).writeProgramFile(program);
     new File(afterFile).writeAsStringSync('$after');
diff --git a/pkg/kernel/test/treeshaker_membench.dart b/pkg/kernel/test/treeshaker_membench.dart
index 9866d19..275fd18 100644
--- a/pkg/kernel/test/treeshaker_membench.dart
+++ b/pkg/kernel/test/treeshaker_membench.dart
@@ -11,12 +11,13 @@
 import 'package:args/args.dart';
 import 'dart:io';
 
-ArgParser argParser = new ArgParser()
+ArgParser argParser = new ArgParser(allowTrailingOptions: true)
   ..addOption('count',
-      abbr: 'c', help: 'Build N copies of the tree shaker', defaultsTo: '100');
+      abbr: 'c', help: 'Build N copies of the tree shaker', defaultsTo: '100')
+  ..addFlag('strong', help: 'Run the tree shaker in strong mode');
 
 String usage = """
-Usage: treeshaker_membench [options] FILE.dart
+Usage: treeshaker_membench [options] FILE.dill
 
 Options:
 ${argParser.usage}
@@ -35,6 +36,7 @@
     exit(1);
   }
   String filename = options.rest.single;
+  bool strongMode = options['strong'];
 
   Program program = loadProgramFromBinary(filename);
   ClassHierarchy hierarchy = new ClassHierarchy(program);
@@ -43,7 +45,8 @@
   int copyCount = int.parse(options['count']);
 
   TreeShaker buildTreeShaker() {
-    return new TreeShaker(program, hierarchy: hierarchy, coreTypes: coreTypes);
+    return new TreeShaker(program,
+        hierarchy: hierarchy, coreTypes: coreTypes, strongMode: strongMode);
   }
 
   List<TreeShaker> keepAlive = <TreeShaker>[];
diff --git a/pkg/kernel/testcases/closures/type_variables.dart.expect b/pkg/kernel/testcases/closures/type_variables.dart.expect
index b58d4db..0939dad 100644
--- a/pkg/kernel/testcases/closures/type_variables.dart.expect
+++ b/pkg/kernel/testcases/closures/type_variables.dart.expect
@@ -13,9 +13,6 @@
     #context.[]=(0, this);
     return new self::Closure#C#foo#function::•<self::C::T, self::C::S>(#context);
   }
-  method bar() → dynamic {
-    self::C<self::C::T, self::C::S> self = this;
-  }
   method baz() → dynamic {
     return new self::Closure#C#baz#function::•<self::C::T, self::C::S>(null);
   }
diff --git a/pkg/kernel/testcases/input/unused_methods.dart b/pkg/kernel/testcases/input/unused_methods.dart
new file mode 100644
index 0000000..5d2c38c
--- /dev/null
+++ b/pkg/kernel/testcases/input/unused_methods.dart
@@ -0,0 +1,90 @@
+// 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 UnusedClass {
+  UnusedClass() {
+    print('Unused');
+  }
+}
+
+abstract class UsedAsBaseClass {
+  void usedInSubclass() {
+    print('Unused');
+  }
+
+  void calledFromB() {
+    this.calledFromSubclass();
+  }
+
+  void calledFromSubclass() {
+    print('Unused');
+  }
+}
+
+class UsedAsInterface {
+  void usedInSubclass() {
+    print('Unused');
+  }
+}
+
+class InstantiatedButMethodsUnused {
+  void usedInSubclass() {
+    print('Unused');
+  }
+}
+
+class ClassA extends UsedAsBaseClass
+    implements UsedAsInterface, InstantiatedButMethodsUnused {
+  void usedInSubclass() {
+    print('A');
+  }
+}
+
+class ClassB extends UsedAsBaseClass
+    implements UsedAsInterface, InstantiatedButMethodsUnused {
+  void usedInSubclass() {
+    print('B');
+    calledFromB();
+  }
+
+  void calledFromSubclass() {}
+}
+
+void baseClassCall(UsedAsBaseClass object) {
+  object.usedInSubclass();
+}
+
+void interfaceCall(UsedAsInterface object) {
+  object.usedInSubclass();
+}
+
+void exactCallA(ClassA object) {
+  object.usedInSubclass();
+}
+
+void exactCallB(ClassB object) {
+  object.usedInSubclass();
+}
+
+unusedTopLevel() {
+  print('Unused');
+}
+
+usedTopLevel() {}
+
+main() {
+  usedTopLevel();
+
+  ClassA a = new ClassA();
+  exactCallA(a);
+  baseClassCall(a);
+  interfaceCall(a);
+
+  ClassB b = new ClassB();
+  exactCallB(b);
+  baseClassCall(b);
+  interfaceCall(b);
+
+  new InstantiatedButMethodsUnused();
+}
diff --git a/pkg/kernel/testcases/spec-mode/unused_methods.baseline.txt b/pkg/kernel/testcases/spec-mode/unused_methods.baseline.txt
new file mode 100644
index 0000000..4bd1746
--- /dev/null
+++ b/pkg/kernel/testcases/spec-mode/unused_methods.baseline.txt
@@ -0,0 +1,86 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class UnusedClass extends core::Object {
+  constructor •() → void
+    : super core::Object::•() {
+    core::print("Unused");
+  }
+}
+abstract class UsedAsBaseClass extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  method usedInSubclass() → void {
+    core::print("Unused");
+  }
+  method calledFromB() → void {
+    this.calledFromSubclass();
+  }
+  method calledFromSubclass() → void {
+    core::print("Unused");
+  }
+}
+class UsedAsInterface extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  method usedInSubclass() → void {
+    core::print("Unused");
+  }
+}
+class InstantiatedButMethodsUnused extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  method usedInSubclass() → void {
+    core::print("Unused");
+  }
+}
+class ClassA extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+  constructor •() → void
+    : super self::UsedAsBaseClass::•()
+    ;
+  method usedInSubclass() → void {
+    core::print("A");
+  }
+}
+class ClassB extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+  constructor •() → void
+    : super self::UsedAsBaseClass::•()
+    ;
+  method usedInSubclass() → void {
+    core::print("B");
+    this.calledFromB();
+  }
+  method calledFromSubclass() → void {}
+}
+static method baseClassCall(self::UsedAsBaseClass object) → void {
+  object.usedInSubclass();
+}
+static method interfaceCall(self::UsedAsInterface object) → void {
+  object.usedInSubclass();
+}
+static method exactCallA(self::ClassA object) → void {
+  object.usedInSubclass();
+}
+static method exactCallB(self::ClassB object) → void {
+  object.usedInSubclass();
+}
+static method unusedTopLevel() → dynamic {
+  core::print("Unused");
+}
+static method usedTopLevel() → dynamic {}
+static method main() → dynamic {
+  self::usedTopLevel();
+  self::ClassA a = new self::ClassA::•();
+  self::exactCallA(a);
+  self::baseClassCall(a);
+  self::interfaceCall(a);
+  self::ClassB b = new self::ClassB::•();
+  self::exactCallB(b);
+  self::baseClassCall(b);
+  self::interfaceCall(b);
+  new self::InstantiatedButMethodsUnused::•();
+}
diff --git a/pkg/kernel/testcases/strong-mode/DeltaBlue.baseline.txt b/pkg/kernel/testcases/strong-mode/DeltaBlue.baseline.txt
index 7f44a83..2579576 100644
--- a/pkg/kernel/testcases/strong-mode/DeltaBlue.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/DeltaBlue.baseline.txt
@@ -29,9 +29,6 @@
   static method weakest(self::Strength s1, self::Strength s2) → self::Strength {
     return self::Strength::weaker(s1, s2) ? s1 : s2;
   }
-  static method strongest(self::Strength s1, self::Strength s2) → self::Strength {
-    return self::Strength::stronger(s1, s2) ? s1 : s2;
-  }
 }
 abstract class Constraint extends core::Object {
   final field self::Strength strength;
@@ -360,8 +357,6 @@
   method addConstraint(self::Constraint c) → void {
     this.{self::Plan::list}.{core::List::add$cc}(c);
   }
-  method size() → core::int
-    return this.{self::Plan::list}.{core::List::length};
   method execute() → void {
     for (core::int i = 0; i.{core::num::<}(this.{self::Plan::list}.{core::List::length}); i = i.{core::num::+}(1)) {
       this.{self::Plan::list}.{core::List::[]}(i).{self::Constraint::execute}();
diff --git a/pkg/kernel/testcases/strong-mode/async_function.baseline.txt b/pkg/kernel/testcases/strong-mode/async_function.baseline.txt
index 4cbc5e0..d498bf6 100644
--- a/pkg/kernel/testcases/strong-mode/async_function.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/async_function.baseline.txt
@@ -3,29 +3,9 @@
 import "dart:async" as asy;
 import "dart:core" as core;
 
-static field core::List<core::String> stringList = <core::String>["bar"];
 static method asyncString() → asy::Future<core::String> async {
   return "foo";
 }
-static method asyncString2() → asy::Future<core::String> async {
-  return self::asyncString();
-}
-static method syncStarString() → core::Iterable<core::String> sync* {
-  yield "foo";
-  yield* self::syncStarString2();
-  yield* self::stringList;
-}
-static method syncStarString2() → core::Iterable<core::String> sync* {
-  yield "foo";
-}
-static method asyncStarString() → asy::Stream<core::String> async* {
-  yield "foo";
-  yield* self::asyncStarString2();
-  yield await self::asyncString();
-}
-static method asyncStarString2() → asy::Stream<core::String> async* {
-  yield "bar";
-}
 static method main() → dynamic async {
   core::String str = await self::asyncString();
 }
diff --git a/pkg/kernel/testcases/strong-mode/escape.baseline.txt b/pkg/kernel/testcases/strong-mode/escape.baseline.txt
index fd61f99..ff16c94 100644
--- a/pkg/kernel/testcases/strong-mode/escape.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/escape.baseline.txt
@@ -14,13 +14,6 @@
     : super core::Object::•()
     ;
 }
-class C extends core::Object {
-  constructor •() → void
-    : super core::Object::•()
-    ;
-  operator ==(dynamic x) → core::bool
-    return false;
-}
 class X extends core::Object implements self::A, self::B {
   field dynamic field = null;
   constructor •() → void
diff --git a/pkg/kernel/testcases/strong-mode/micro.baseline.txt b/pkg/kernel/testcases/strong-mode/micro.baseline.txt
index 994a9c9..fabb29d 100644
--- a/pkg/kernel/testcases/strong-mode/micro.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/micro.baseline.txt
@@ -11,14 +11,8 @@
   }
 }
 abstract class ExternalValue extends core::Object {
-  constructor •() → void
-    : super core::Object::•()
-    ;
 }
 abstract class Bar extends core::Object {
-  constructor •() → void
-    : super core::Object::•()
-    ;
   abstract method externalInstanceMethod() → self::ExternalValue;
 }
 class Box extends core::Object {
diff --git a/pkg/kernel/testcases/strong-mode/named_parameters.baseline.txt b/pkg/kernel/testcases/strong-mode/named_parameters.baseline.txt
index b296c16..ad415f8 100644
--- a/pkg/kernel/testcases/strong-mode/named_parameters.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/named_parameters.baseline.txt
@@ -2,27 +2,19 @@
 import self as self;
 import "dart:core" as core;
 
-class Superclass extends core::Object {
+abstract class Superclass extends core::Object {
   constructor •() → void
     : super core::Object::•()
     ;
-  method foo({dynamic alpha, dynamic beta}) → dynamic {}
-  method bar({dynamic beta, dynamic alpha}) → dynamic {}
-  method namedCallback(({alpha: core::String, beta: core::int}) → dynamic callback) → dynamic {
-    callback.call(alpha: "one", beta: 2);
-    callback.call(beta: 1, alpha: "two");
-  }
+  abstract method foo({dynamic alpha, dynamic beta}) → dynamic;
 }
 class Subclass extends self::Superclass {
   constructor •() → void
     : super self::Superclass::•()
     ;
   method foo({dynamic beta, dynamic alpha}) → dynamic {}
-  method bar({dynamic alpha, dynamic beta}) → dynamic {}
-  method namedCallback(({alpha: core::String, beta: core::int}) → dynamic callback) → dynamic {}
 }
 static method topLevelNamed(dynamic beta, dynamic alpha, {dynamic gamma, dynamic delta}) → dynamic {}
-static method topLevelOptional(dynamic beta, dynamic alpha, [dynamic gamma, dynamic delta]) → dynamic {}
 static method main() → dynamic {
   new self::Subclass::•().{self::Subclass::foo}(beta: 1, alpha: 2);
   new self::Subclass::•().{self::Subclass::foo}(alpha: 1, beta: 2);
diff --git a/pkg/kernel/testcases/strong-mode/optional.baseline.txt b/pkg/kernel/testcases/strong-mode/optional.baseline.txt
index 0ba01b9..9387b66 100644
--- a/pkg/kernel/testcases/strong-mode/optional.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/optional.baseline.txt
@@ -15,9 +15,6 @@
   }
 }
 abstract class External extends core::Object {
-  constructor •() → void
-    : super core::Object::•()
-    ;
   abstract method externalMethod(core::int x, [core::int y, core::int z]) → core::String;
   abstract method listen(self::Listener listener) → void;
 }
@@ -43,7 +40,6 @@
   constructor •() → void
     : super core::Object::•()
     ;
-  method event(dynamic input, [dynamic x]) → void {}
 }
 external static method createExternal() → self::External;
 static method main() → dynamic {
diff --git a/pkg/kernel/testcases/strong-mode/prefer_baseclass.baseline.txt b/pkg/kernel/testcases/strong-mode/prefer_baseclass.baseline.txt
index 8e82d39..4783efb 100644
--- a/pkg/kernel/testcases/strong-mode/prefer_baseclass.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/prefer_baseclass.baseline.txt
@@ -2,12 +2,12 @@
 import self as self;
 import "dart:core" as core;
 
-class A extends core::Object {
+abstract class A extends core::Object {
   constructor •() → void
     : super core::Object::•()
     ;
 }
-class B extends core::Object {
+abstract class B extends core::Object {
   constructor •() → void
     : super core::Object::•()
     ;
diff --git a/pkg/kernel/testcases/strong-mode/redirecting_factory.baseline.txt b/pkg/kernel/testcases/strong-mode/redirecting_factory.baseline.txt
index be5bd7c..5471c7c 100644
--- a/pkg/kernel/testcases/strong-mode/redirecting_factory.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/redirecting_factory.baseline.txt
@@ -14,32 +14,21 @@
     core::print("Bar<${self::Bar::Sb},${self::Bar::Tb}>");
   }
 }
-class Builder<X extends core::Object> extends core::Object {
-  constructor •() → void
-    : super core::Object::•()
-    ;
-  method method() → dynamic {
-    return new self::Bar::•<core::String, self::Builder::X>(4);
-  }
+abstract class SimpleCase<A extends core::Object, B extends core::Object> extends core::Object {
 }
-class SimpleCase<A extends core::Object, B extends core::Object> extends core::Object {
-}
-class SimpleCaseImpl<Ai extends core::Object, Bi extends core::Object> extends core::Object implements self::SimpleCase<self::SimpleCaseImpl::Ai, self::SimpleCaseImpl::Bi> {
+abstract class SimpleCaseImpl<Ai extends core::Object, Bi extends core::Object> extends core::Object implements self::SimpleCase<self::SimpleCaseImpl::Ai, self::SimpleCaseImpl::Bi> {
 }
 class SimpleCaseImpl2<Ai2 extends core::Object, Bi2 extends core::Object> extends core::Object implements self::SimpleCaseImpl<self::SimpleCaseImpl2::Ai2, self::SimpleCaseImpl2::Bi2> {
   constructor •() → void
     : super core::Object::•()
     ;
 }
-class Base<M extends core::Object> extends core::Object {
+abstract class Base<M extends core::Object> extends core::Object {
   constructor •() → void
     : super core::Object::•()
     ;
 }
-class Mixin<M extends core::Object> extends core::Object {
-  constructor •() → void
-    : super core::Object::•()
-    ;
+abstract class Mixin<M extends core::Object> extends core::Object {
 }
 class Mix<M extends core::Object> extends self::Base<self::Mix::M> implements self::Mixin<self::Mix::M> {
   constructor •() → void
diff --git a/pkg/kernel/testcases/strong-mode/stringliteral.baseline.txt b/pkg/kernel/testcases/strong-mode/stringliteral.baseline.txt
index 00fca06..bef6d48 100644
--- a/pkg/kernel/testcases/strong-mode/stringliteral.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/stringliteral.baseline.txt
@@ -1,11 +1,4 @@
 library;
 import self as self;
-import "dart:core" as core;
 
-static field core::String color = "brown";
-static field core::String thing = "lazy dog";
-static field core::String phrase = "The quick ${self::color} fox\njumped over the ${self::thing}.\n";
-static field core::String adjacent = "${self::color}${self::color}${self::color}";
-static field core::String linebreaks = "${self::color}\n${self::color}\n${self::color}";
-static field core::String other = "${self::color}\n is \n${self::color}";
 static method main() → dynamic {}
diff --git a/pkg/kernel/testcases/strong-mode/uninitialized_fields.baseline.txt b/pkg/kernel/testcases/strong-mode/uninitialized_fields.baseline.txt
index c4b9044..bef6d48 100644
--- a/pkg/kernel/testcases/strong-mode/uninitialized_fields.baseline.txt
+++ b/pkg/kernel/testcases/strong-mode/uninitialized_fields.baseline.txt
@@ -1,37 +1,4 @@
 library;
 import self as self;
-import "dart:core" as core;
 
-class Uninitialized extends core::Object {
-  field core::int x = null;
-  constructor •() → void
-    : super core::Object::•()
-    ;
-}
-class PartiallyInitialized extends core::Object {
-  field core::int x = null;
-  constructor •(core::int x) → void
-    : self::PartiallyInitialized::x = x, super core::Object::•()
-    ;
-  constructor noInitializer() → void
-    : super core::Object::•()
-    ;
-}
-class Initialized extends core::Object {
-  field core::int x;
-  constructor •(core::int x) → void
-    : self::Initialized::x = x, super core::Object::•()
-    ;
-}
-class Forwarding extends core::Object {
-  field core::int x;
-  constructor initialize(core::int x) → void
-    : self::Forwarding::x = x, super core::Object::•()
-    ;
-  constructor •(core::int arg) → void
-    : this self::Forwarding::initialize(arg)
-    ;
-}
-static field core::int uninitializedTopLevel = null;
-static field core::int initializedTopLevel = 4;
 static method main() → dynamic {}
diff --git a/pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt b/pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt
new file mode 100644
index 0000000..02debc7
--- /dev/null
+++ b/pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt
@@ -0,0 +1,67 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class UsedAsBaseClass extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  abstract method usedInSubclass() → void;
+  method calledFromB() → void {
+    this.{self::UsedAsBaseClass::calledFromSubclass}();
+  }
+  abstract method calledFromSubclass() → void;
+}
+abstract class UsedAsInterface extends core::Object {
+  abstract method usedInSubclass() → void;
+}
+class InstantiatedButMethodsUnused extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  method usedInSubclass() → void
+    throw "Method removed by tree-shaking";
+}
+class ClassA extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+  constructor •() → void
+    : super self::UsedAsBaseClass::•()
+    ;
+  method usedInSubclass() → void {
+    core::print("A");
+  }
+}
+class ClassB extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+  constructor •() → void
+    : super self::UsedAsBaseClass::•()
+    ;
+  method usedInSubclass() → void {
+    core::print("B");
+    this.{self::UsedAsBaseClass::calledFromB}();
+  }
+  method calledFromSubclass() → void {}
+}
+static method baseClassCall(self::UsedAsBaseClass object) → void {
+  object.{self::UsedAsBaseClass::usedInSubclass}();
+}
+static method interfaceCall(self::UsedAsInterface object) → void {
+  object.{self::UsedAsInterface::usedInSubclass}();
+}
+static method exactCallA(self::ClassA object) → void {
+  object.{self::ClassA::usedInSubclass}();
+}
+static method exactCallB(self::ClassB object) → void {
+  object.{self::ClassB::usedInSubclass}();
+}
+static method usedTopLevel() → dynamic {}
+static method main() → dynamic {
+  self::usedTopLevel();
+  self::ClassA a = new self::ClassA::•();
+  self::exactCallA(a);
+  self::baseClassCall(a);
+  self::interfaceCall(a);
+  self::ClassB b = new self::ClassB::•();
+  self::exactCallB(b);
+  self::baseClassCall(b);
+  self::interfaceCall(b);
+  new self::InstantiatedButMethodsUnused::•();
+}
diff --git a/pkg/kernel/testcases/type-propagation/unused_methods.baseline.txt b/pkg/kernel/testcases/type-propagation/unused_methods.baseline.txt
new file mode 100644
index 0000000..13cd886
--- /dev/null
+++ b/pkg/kernel/testcases/type-propagation/unused_methods.baseline.txt
@@ -0,0 +1,86 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class UnusedClass extends core::Object {
+  constructor •() → void
+    : super core::Object::•() {
+    core::print("Unused");
+  }
+}
+abstract class UsedAsBaseClass extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  method usedInSubclass() → void/Null {
+    core::print("Unused");
+  }
+  method calledFromB() → void/Null {
+    this.calledFromSubclass();
+  }
+  method calledFromSubclass() → void/Null {
+    core::print("Unused");
+  }
+}
+class UsedAsInterface extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  method usedInSubclass() → void/Null {
+    core::print("Unused");
+  }
+}
+class InstantiatedButMethodsUnused extends core::Object {
+  constructor •() → void
+    : super core::Object::•()
+    ;
+  method usedInSubclass() → void/Null {
+    core::print("Unused");
+  }
+}
+class ClassA extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+  constructor •() → void
+    : super self::UsedAsBaseClass::•()
+    ;
+  method usedInSubclass() → void/Null {
+    core::print("A");
+  }
+}
+class ClassB extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+  constructor •() → void
+    : super self::UsedAsBaseClass::•()
+    ;
+  method usedInSubclass() → void/Null {
+    core::print("B");
+    this.calledFromB();
+  }
+  method calledFromSubclass() → void/Null {}
+}
+static method baseClassCall(self::UsedAsBaseClass/self::UsedAsBaseClass+ {other} object) → void/Null {
+  object.usedInSubclass();
+}
+static method interfaceCall(self::UsedAsInterface/self::UsedAsBaseClass+ {other} object) → void/Null {
+  object.usedInSubclass();
+}
+static method exactCallA(self::ClassA/self::ClassA! {other} object) → void/Null {
+  object.usedInSubclass();
+}
+static method exactCallB(self::ClassB/self::ClassB! {other} object) → void/Null {
+  object.usedInSubclass();
+}
+static method unusedTopLevel() → dynamic/Null {
+  core::print("Unused");
+}
+static method usedTopLevel() → dynamic/Null {}
+static method main() → dynamic/Null {
+  self::usedTopLevel();
+  self::ClassA/self::ClassA! {other} a = new self::ClassA::•();
+  self::exactCallA(a);
+  self::baseClassCall(a);
+  self::interfaceCall(a);
+  self::ClassB/self::ClassB! {other} b = new self::ClassB::•();
+  self::exactCallB(b);
+  self::baseClassCall(b);
+  self::interfaceCall(b);
+  new self::InstantiatedButMethodsUnused::•();
+}
diff --git a/pkg/pkg.status b/pkg/pkg.status
index d0e1b66..0bb8e1e 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -73,6 +73,7 @@
 front_end/test/memory_file_system_test: CompileTimeError # Issue 23773
 front_end/test/dependency_grapher_test: SkipByDesign # Uses dart:io
 front_end/test/physical_file_system_test: SkipByDesign # Uses dart:io
+front_end/test/src/base/file_repository_test: SkipByDesign # Uses dart:io
 front_end/test/src/base/libraries_reader_test: SkipByDesign # Uses dart:io
 front_end/test/src/base/processed_options_test: SkipByDesign # Uses dart:io
 front_end/test/subpackage_relationships_test: SkipByDesign # Uses dart:io
@@ -91,7 +92,7 @@
 [ $runtime == jsshell ]
 async/test/stream_zip_test: RuntimeError, OK # Issue 26103. Timers are not supported.
 lookup_map/test/lookup_map_test: RuntimeError, OK # Issue 26103. Timers are not supported.
-front_end/test/*: RuntimeError, OK # Issue 26103. Timers are not supported.
+front_end/test/*: RuntimeError, OK, Pass # Issue 26103. Timers are not supported.
 kernel/test/*: RuntimeError, OK # Issue 26103. Timers are not supported.
 
 [ $compiler == dart2js && $runtime == drt ]
diff --git a/pkg/pkgbuild.status b/pkg/pkgbuild.status
index 32dad8f..7ba877f 100644
--- a/pkg/pkgbuild.status
+++ b/pkg/pkgbuild.status
@@ -4,12 +4,14 @@
 
 [ $use_public_packages ]
 pkg/compiler: SkipByDesign # js_ast is not published
+third_party/pkg/linter: Skip # Issue 27937
 
 [ ($use_repository_packages || $use_public_packages) ]
 pkg/dev_compiler: SkipByDesign # we have relative paths to analyzer
 pkg/analyzer: Fail # Issue 27654
 pkg/front_end: Fail # Issue 27655
 pkg/kernel: SkipByDesign # Issue 27937
+third_party/pkg/linter: SkipByDesign # Issue 27937
 
 [ $use_repository_packages ]
-third_party/pkg_tested/dart_style: Fail # Issue https://github.com/dart-lang/dart_style/issues/562
\ No newline at end of file
+third_party/pkg_tested/dart_style: Fail # Issue https://github.com/dart-lang/dart_style/issues/562
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 36983b6..05d33f7 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -28,6 +28,9 @@
   dart_target_arch = ""
 
   dart_experimental_interpreter = false
+
+  # The optimization level to use for debug builds.
+  dart_debug_optimization_level = "2"
 }
 
 config("dart_public_config") {
@@ -163,7 +166,7 @@
     ]
 
     if (dart_debug) {
-      cflags += [ "-O2" ]
+      cflags += [ "-O${dart_debug_optimization_level}" ]
     } else {
       cflags += [ "-O3" ]
     }
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index ee6119a..c3140f0 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -821,6 +821,9 @@
     # The only effect of DART_SHARED_LIB is to export the Dart API.
     "DART_SHARED_LIB",
   ]
+  if (is_linux || is_android) {
+    cflags = [ "-fPIC" ]
+  }
   if (is_win) {
     libs = [ "dart.lib" ]
     abs_root_out_dir = rebase_path(root_out_dir)
@@ -841,6 +844,9 @@
     # The only effect of DART_SHARED_LIB is to export the Dart API.
     "DART_SHARED_LIB",
   ]
+  if (is_linux || is_android) {
+    cflags = [ "-fPIC" ]
+  }
   if (is_win) {
     libs = [ "dart.lib" ]
     abs_root_out_dir = rebase_path(root_out_dir)
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc
index 3997a32d..f99a5d1 100644
--- a/runtime/bin/directory.cc
+++ b/runtime/bin/directory.cc
@@ -124,12 +124,22 @@
   Dart_Handle path = Dart_GetNativeArgument(args, 1);
   Dart_Handle recursive = Dart_GetNativeArgument(args, 2);
   Dart_Handle follow_links = Dart_GetNativeArgument(args, 3);
-  // Pass the list that should hold the directory listing to the
-  // SyncDirectoryListing object, which adds elements to it.
-  SyncDirectoryListing sync_listing(results, DartUtils::GetStringValue(path),
-                                    DartUtils::GetBooleanValue(recursive),
-                                    DartUtils::GetBooleanValue(follow_links));
-  Directory::List(&sync_listing);
+
+  Dart_Handle dart_error;
+  {
+    // Pass the list that should hold the directory listing to the
+    // SyncDirectoryListing object, which adds elements to it.
+    SyncDirectoryListing sync_listing(results, DartUtils::GetStringValue(path),
+                                      DartUtils::GetBooleanValue(recursive),
+                                      DartUtils::GetBooleanValue(follow_links));
+    Directory::List(&sync_listing);
+    dart_error = sync_listing.dart_error();
+  }
+  if (Dart_IsError(dart_error)) {
+    Dart_PropagateError(dart_error);
+  } else if (!Dart_IsNull(dart_error)) {
+    Dart_ThrowException(dart_error);
+  }
 }
 
 
@@ -401,7 +411,8 @@
   Dart_Handle dir = Dart_New(directory_type_, Dart_Null(), 1, &dir_name_dart);
   Dart_Handle result = Dart_Invoke(results_, add_string_, 1, &dir);
   if (Dart_IsError(result)) {
-    Dart_PropagateError(result);
+    dart_error_ = result;
+    return false;
   }
   return true;
 }
@@ -412,7 +423,8 @@
   Dart_Handle link = Dart_New(link_type_, Dart_Null(), 1, &link_name_dart);
   Dart_Handle result = Dart_Invoke(results_, add_string_, 1, &link);
   if (Dart_IsError(result)) {
-    Dart_PropagateError(result);
+    dart_error_ = result;
+    return false;
   }
   return true;
 }
@@ -423,7 +435,8 @@
   Dart_Handle file = Dart_New(file_type_, Dart_Null(), 1, &file_name_dart);
   Dart_Handle result = Dart_Invoke(results_, add_string_, 1, &file);
   if (Dart_IsError(result)) {
-    Dart_PropagateError(result);
+    dart_error_ = result;
+    return false;
   }
   return true;
 }
@@ -435,10 +448,11 @@
   args[0] = DartUtils::NewString("Directory listing failed");
   args[1] = DartUtils::NewString(error() ? "Invalid path" : CurrentPath());
   args[2] = dart_os_error;
-  Dart_ThrowException(Dart_New(
+
+  dart_error_ = Dart_New(
       DartUtils::GetDartType(DartUtils::kIOLibURL, "FileSystemException"),
-      Dart_Null(), 3, args));
-  return true;
+      Dart_Null(), 3, args);
+  return false;
 }
 
 
diff --git a/runtime/bin/directory.h b/runtime/bin/directory.h
index 86026b7..433a6cc 100644
--- a/runtime/bin/directory.h
+++ b/runtime/bin/directory.h
@@ -196,7 +196,9 @@
                        const char* dir_name,
                        bool recursive,
                        bool follow_links)
-      : DirectoryListing(dir_name, recursive, follow_links), results_(results) {
+      : DirectoryListing(dir_name, recursive, follow_links),
+        results_(results),
+        dart_error_(Dart_Null()) {
     add_string_ = DartUtils::NewString("add");
     directory_type_ = DartUtils::GetDartType(DartUtils::kIOLibURL, "Directory");
     file_type_ = DartUtils::GetDartType(DartUtils::kIOLibURL, "File");
@@ -208,12 +210,15 @@
   virtual bool HandleLink(const char* file_name);
   virtual bool HandleError();
 
+  Dart_Handle dart_error() { return dart_error_; }
+
  private:
   Dart_Handle results_;
   Dart_Handle add_string_;
   Dart_Handle directory_type_;
   Dart_Handle file_type_;
   Dart_Handle link_type_;
+  Dart_Handle dart_error_;
 
   DISALLOW_ALLOCATION()
   DISALLOW_IMPLICIT_CONSTRUCTORS(SyncDirectoryListing);
diff --git a/runtime/bin/directory_fuchsia.cc b/runtime/bin/directory_fuchsia.cc
index c931171..f47f81d4 100644
--- a/runtime/bin/directory_fuchsia.cc
+++ b/runtime/bin/directory_fuchsia.cc
@@ -118,9 +118,6 @@
   // ports.
   errno = 0;
   dirent* entry = readdir(reinterpret_cast<DIR*>(lister_));
-  if (entry == NULL) {
-    perror("readdir failed: ");
-  }
   if (entry != NULL) {
     if (!listing->path_buffer().Add(entry->d_name)) {
       done_ = true;
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc
index c9c4b0d..8ab91cd 100644
--- a/runtime/bin/eventhandler_android.cc
+++ b/runtime/bin/eventhandler_android.cc
@@ -336,9 +336,12 @@
     } else {
       DescriptorInfo* di =
           reinterpret_cast<DescriptorInfo*>(events[i].data.ptr);
-      intptr_t event_mask = GetPollEvents(events[i].events, di);
-      if (event_mask != 0) {
-        intptr_t old_mask = di->Mask();
+      const intptr_t old_mask = di->Mask();
+      const intptr_t event_mask = GetPollEvents(events[i].events, di);
+      if ((event_mask & (1 << kErrorEvent)) != 0) {
+        di->NotifyAllDartPorts(event_mask);
+        UpdateEpollInstance(old_mask, di);
+      } else if (event_mask != 0) {
         Dart_Port port = di->NextNotifyDartPort(event_mask);
         ASSERT(port != 0);
         UpdateEpollInstance(old_mask, di);
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index 667e9b0..6531ce5 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -388,16 +388,13 @@
     } else {
       DescriptorInfo* di =
           reinterpret_cast<DescriptorInfo*>(events[i].data.ptr);
-      intptr_t event_mask = GetPollEvents(events[i].events, di);
-
+      const intptr_t old_mask = di->Mask();
+      const intptr_t event_mask = GetPollEvents(events[i].events, di);
+      LOG_INFO("HandleEvents: fd=%ld events=%ld\n", di->fd(), event_mask);
       if ((event_mask & (1 << kErrorEvent)) != 0) {
         di->NotifyAllDartPorts(event_mask);
-      }
-      event_mask &= ~(1 << kErrorEvent);
-
-      LOG_INFO("HandleEvents: fd=%ld events=%ld\n", di->fd(), event_mask);
-      if (event_mask != 0) {
-        intptr_t old_mask = di->Mask();
+        UpdateEpollInstance(old_mask, di);
+      } else if (event_mask != 0) {
         Dart_Port port = di->NextNotifyDartPort(event_mask);
         ASSERT(port != 0);
         UpdateEpollInstance(old_mask, di);
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 8b35818..24e7755 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -361,15 +361,12 @@
     } else {
       DescriptorInfo* di =
           reinterpret_cast<DescriptorInfo*>(events[i].data.ptr);
-      intptr_t event_mask = GetPollEvents(events[i].events, di);
-
+      const intptr_t old_mask = di->Mask();
+      const intptr_t event_mask = GetPollEvents(events[i].events, di);
       if ((event_mask & (1 << kErrorEvent)) != 0) {
         di->NotifyAllDartPorts(event_mask);
-      }
-      event_mask &= ~(1 << kErrorEvent);
-
-      if (event_mask != 0) {
-        intptr_t old_mask = di->Mask();
+        UpdateEpollInstance(old_mask, di);
+      } else if (event_mask != 0) {
         Dart_Port port = di->NextNotifyDartPort(event_mask);
         ASSERT(port != 0);
         UpdateEpollInstance(old_mask, di);
diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
index 640f05a..7aa9280 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -388,14 +388,12 @@
       interrupt_seen = true;
     } else {
       DescriptorInfo* di = reinterpret_cast<DescriptorInfo*>(events[i].udata);
-      intptr_t event_mask = GetEvents(events + i, di);
+      const intptr_t old_mask = di->Mask();
+      const intptr_t event_mask = GetEvents(events + i, di);
       if ((event_mask & (1 << kErrorEvent)) != 0) {
         di->NotifyAllDartPorts(event_mask);
-      }
-      event_mask &= ~(1 << kErrorEvent);
-
-      if (event_mask != 0) {
-        intptr_t old_mask = di->Mask();
+        UpdateKQueueInstance(old_mask, di);
+      } else if (event_mask != 0) {
         Dart_Port port = di->NextNotifyDartPort(event_mask);
         ASSERT(port != 0);
         UpdateKQueueInstance(old_mask, di);
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 81adcfd..f988712 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -145,6 +145,12 @@
 
 
 void Handle::Close() {
+  if (!SupportsOverlappedIO()) {
+    // If the handle uses synchronous I/O (e.g. stdin), cancel any pending
+    // operation before closing the handle, so the read thread is not blocked.
+    BOOL result = CancelIoEx(handle_, NULL);
+    ASSERT(result || (GetLastError() == ERROR_NOT_FOUND));
+  }
   MonitorLocker ml(monitor_);
   if (!IsClosing()) {
     // Close the socket and set the closing state. This close method can be
diff --git a/runtime/bin/extensions_android.cc b/runtime/bin/extensions_android.cc
index 44df410..85b20ae 100644
--- a/runtime/bin/extensions_android.cc
+++ b/runtime/bin/extensions_android.cc
@@ -11,10 +11,11 @@
 namespace dart {
 namespace bin {
 
-const char* kPrecompiledVMIsolateSymbolName = "_kVmIsolateSnapshot";
-const char* kPrecompiledIsolateSymbolName = "_kIsolateSnapshot";
-const char* kPrecompiledInstructionsSymbolName = "_kInstructionsSnapshot";
-const char* kPrecompiledDataSymbolName = "_kDataSnapshot";
+const char* kVmSnapshotDataSymbolName = "_kDartVmSnapshotData";
+const char* kVmSnapshotInstructionsSymbolName = "_kDartVmSnapshotInstructions";
+const char* kIsolateSnapshotDataSymbolName = "_kDartIsolateSnapshotData";
+const char* kIsolateSnapshotInstructionsSymbolName =
+    "_kDartIsolateSnapshotInstructions";
 
 void* Extensions::LoadExtensionLibrary(const char* library_file) {
   return dlopen(library_file, RTLD_LAZY);
diff --git a/runtime/bin/extensions_fuchsia.cc b/runtime/bin/extensions_fuchsia.cc
index 691cac3..b464fe0 100644
--- a/runtime/bin/extensions_fuchsia.cc
+++ b/runtime/bin/extensions_fuchsia.cc
@@ -11,10 +11,11 @@
 namespace dart {
 namespace bin {
 
-const char* kPrecompiledVMIsolateSymbolName = "_kVmIsolateSnapshot";
-const char* kPrecompiledIsolateSymbolName = "_kIsolateSnapshot";
-const char* kPrecompiledInstructionsSymbolName = "_kInstructionsSnapshot";
-const char* kPrecompiledDataSymbolName = "_kDataSnapshot";
+const char* kVmSnapshotDataSymbolName = "_kDartVmSnapshotData";
+const char* kVmSnapshotInstructionsSymbolName = "_kDartVmSnapshotInstructions";
+const char* kIsolateSnapshotDataSymbolName = "_kDartIsolateSnapshotData";
+const char* kIsolateSnapshotInstructionsSymbolName =
+    "_kDartIsolateSnapshotInstructions";
 
 void* Extensions::LoadExtensionLibrary(const char* library_file) {
   return dlopen(library_file, RTLD_LAZY);
diff --git a/runtime/bin/extensions_linux.cc b/runtime/bin/extensions_linux.cc
index 264c4ee..1a45e67 100644
--- a/runtime/bin/extensions_linux.cc
+++ b/runtime/bin/extensions_linux.cc
@@ -11,10 +11,11 @@
 namespace dart {
 namespace bin {
 
-const char* kPrecompiledVMIsolateSymbolName = "_kVmIsolateSnapshot";
-const char* kPrecompiledIsolateSymbolName = "_kIsolateSnapshot";
-const char* kPrecompiledInstructionsSymbolName = "_kInstructionsSnapshot";
-const char* kPrecompiledDataSymbolName = "_kDataSnapshot";
+const char* kVmSnapshotDataSymbolName = "_kDartVmSnapshotData";
+const char* kVmSnapshotInstructionsSymbolName = "_kDartVmSnapshotInstructions";
+const char* kIsolateSnapshotDataSymbolName = "_kDartIsolateSnapshotData";
+const char* kIsolateSnapshotInstructionsSymbolName =
+    "_kDartIsolateSnapshotInstructions";
 
 void* Extensions::LoadExtensionLibrary(const char* library_file) {
   return dlopen(library_file, RTLD_LAZY);
diff --git a/runtime/bin/extensions_macos.cc b/runtime/bin/extensions_macos.cc
index 69d712d..d994c17 100644
--- a/runtime/bin/extensions_macos.cc
+++ b/runtime/bin/extensions_macos.cc
@@ -11,10 +11,11 @@
 namespace dart {
 namespace bin {
 
-const char* kPrecompiledVMIsolateSymbolName = "kVmIsolateSnapshot";
-const char* kPrecompiledIsolateSymbolName = "kIsolateSnapshot";
-const char* kPrecompiledInstructionsSymbolName = "kInstructionsSnapshot";
-const char* kPrecompiledDataSymbolName = "kDataSnapshot";
+const char* kVmSnapshotDataSymbolName = "kDartVmSnapshotData";
+const char* kVmSnapshotInstructionsSymbolName = "kDartVmSnapshotInstructions";
+const char* kIsolateSnapshotDataSymbolName = "kDartIsolateSnapshotData";
+const char* kIsolateSnapshotInstructionsSymbolName =
+    "kDartIsolateSnapshotInstructions";
 
 void* Extensions::LoadExtensionLibrary(const char* library_file) {
   return dlopen(library_file, RTLD_LAZY);
diff --git a/runtime/bin/extensions_win.cc b/runtime/bin/extensions_win.cc
index 17bb58f..b07bf59 100644
--- a/runtime/bin/extensions_win.cc
+++ b/runtime/bin/extensions_win.cc
@@ -12,10 +12,11 @@
 namespace dart {
 namespace bin {
 
-const char* kPrecompiledVMIsolateSymbolName = "_kVmIsolateSnapshot";
-const char* kPrecompiledIsolateSymbolName = "_kIsolateSnapshot";
-const char* kPrecompiledInstructionsSymbolName = "_kInstructionsSnapshot";
-const char* kPrecompiledDataSymbolName = "_kDataSnapshot";
+const char* kVmSnapshotDataSymbolName = "_kDartVmSnapshotData";
+const char* kVmSnapshotInstructionsSymbolName = "_kDartVmSnapshotInstructions";
+const char* kIsolateSnapshotDataSymbolName = "_kDartIsolateSnapshotData";
+const char* kIsolateSnapshotInstructionsSymbolName =
+    "_kDartIsolateSnapshotInstructions";
 
 void* Extensions::LoadExtensionLibrary(const char* library_file) {
   SetLastError(0);
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 3ebc8fb..ef809ba 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -60,11 +60,11 @@
 
 // Global state that indicates whether a snapshot is to be created and
 // if so which file to write the snapshot into.
-static const char* vm_isolate_snapshot_filename = NULL;
-static const char* isolate_snapshot_filename = NULL;
+static const char* vm_snapshot_data_filename = NULL;
+static const char* vm_snapshot_instructions_filename = NULL;
+static const char* isolate_snapshot_data_filename = NULL;
+static const char* isolate_snapshot_instructions_filename = NULL;
 static const char* assembly_filename = NULL;
-static const char* instructions_blob_filename = NULL;
-static const char* rodata_blob_filename = NULL;
 
 
 // Value of the --package-root flag.
@@ -189,20 +189,40 @@
 }
 
 
-static bool ProcessVmIsolateSnapshotOption(const char* option) {
-  const char* name = ProcessOption(option, "--vm_isolate_snapshot=");
+static bool ProcessVmSnapshotDataOption(const char* option) {
+  const char* name = ProcessOption(option, "--vm_snapshot_data=");
   if (name != NULL) {
-    vm_isolate_snapshot_filename = name;
+    vm_snapshot_data_filename = name;
     return true;
   }
   return false;
 }
 
 
-static bool ProcessIsolateSnapshotOption(const char* option) {
-  const char* name = ProcessOption(option, "--isolate_snapshot=");
+static bool ProcessVmSnapshotInstructionsOption(const char* option) {
+  const char* name = ProcessOption(option, "--vm_snapshot_instructions=");
   if (name != NULL) {
-    isolate_snapshot_filename = name;
+    vm_snapshot_instructions_filename = name;
+    return true;
+  }
+  return false;
+}
+
+
+static bool ProcessIsolateSnapshotDataOption(const char* option) {
+  const char* name = ProcessOption(option, "--isolate_snapshot_data=");
+  if (name != NULL) {
+    isolate_snapshot_data_filename = name;
+    return true;
+  }
+  return false;
+}
+
+
+static bool ProcessIsolateSnapshotInstructionsOption(const char* option) {
+  const char* name = ProcessOption(option, "--isolate_snapshot_instructions=");
+  if (name != NULL) {
+    isolate_snapshot_instructions_filename = name;
     return true;
   }
   return false;
@@ -219,26 +239,6 @@
 }
 
 
-static bool ProcessInstructionsBlobOption(const char* option) {
-  const char* name = ProcessOption(option, "--instructions_blob=");
-  if (name != NULL) {
-    instructions_blob_filename = name;
-    return true;
-  }
-  return false;
-}
-
-
-static bool ProcessRodataBlobOption(const char* option) {
-  const char* name = ProcessOption(option, "--rodata_blob=");
-  if (name != NULL) {
-    rodata_blob_filename = name;
-    return true;
-  }
-  return false;
-}
-
-
 static bool ProcessEmbedderEntryPointsManifestOption(const char* option) {
   const char* name = ProcessOption(option, "--embedder_entry_points_manifest=");
   if (name != NULL) {
@@ -286,7 +286,8 @@
 
 
 static bool IsSnapshottingForPrecompilation() {
-  return (assembly_filename != NULL) || (instructions_blob_filename != NULL);
+  return (assembly_filename != NULL) ||
+         (vm_snapshot_instructions_filename != NULL);
 }
 
 
@@ -304,11 +305,11 @@
 
   // Parse out the vm options.
   while ((i < argc) && IsValidFlag(argv[i], kPrefix, kPrefixLen)) {
-    if (ProcessVmIsolateSnapshotOption(argv[i]) ||
-        ProcessIsolateSnapshotOption(argv[i]) ||
+    if (ProcessVmSnapshotDataOption(argv[i]) ||
+        ProcessVmSnapshotInstructionsOption(argv[i]) ||
+        ProcessIsolateSnapshotDataOption(argv[i]) ||
+        ProcessIsolateSnapshotInstructionsOption(argv[i]) ||
         ProcessAssemblyOption(argv[i]) ||
-        ProcessInstructionsBlobOption(argv[i]) ||
-        ProcessRodataBlobOption(argv[i]) ||
         ProcessEmbedderEntryPointsManifestOption(argv[i]) ||
         ProcessURLmappingOption(argv[i]) || ProcessPackageRootOption(argv[i]) ||
         ProcessPackagesOption(argv[i]) || ProcessEnvironmentOption(argv[i])) {
@@ -336,19 +337,19 @@
     return -1;
   }
 
-  if (vm_isolate_snapshot_filename == NULL) {
-    Log::PrintErr("No vm isolate snapshot output file specified.\n\n");
+  if (vm_snapshot_data_filename == NULL) {
+    Log::PrintErr("No vm snapshot output file specified.\n\n");
     return -1;
   }
 
-  if (isolate_snapshot_filename == NULL) {
+  if (isolate_snapshot_data_filename == NULL) {
     Log::PrintErr("No isolate snapshot output file specified.\n\n");
     return -1;
   }
 
   bool precompiled_as_assembly = assembly_filename != NULL;
-  bool precompiled_as_blobs =
-      (instructions_blob_filename != NULL) || (rodata_blob_filename != NULL);
+  bool precompiled_as_blobs = (vm_snapshot_instructions_filename != NULL) ||
+                              (isolate_snapshot_instructions_filename != NULL);
   if (precompiled_as_assembly && precompiled_as_blobs) {
     Log::PrintErr(
         "Cannot request a precompiled snapshot simultaneously as "
@@ -357,11 +358,12 @@
         "--rodata-blob=<output.file>)\n\n");
     return -1;
   }
-  if ((instructions_blob_filename != NULL) != (rodata_blob_filename != NULL)) {
+  if ((vm_snapshot_instructions_filename != NULL) !=
+      (isolate_snapshot_instructions_filename != NULL)) {
     Log::PrintErr(
         "Requesting a precompiled snapshot as blobs requires both "
-        "(--instructions-blob=<output.file> and "
-        "--rodata-blob=<output.file>)\n\n");
+        "(--vm_snapshot_instructions=<output.file> and "
+        "--isolate_snapshot_instructions=<output.file>)\n\n");
     return -1;
   }
   if (IsSnapshottingForPrecompilation() && (entry_points_files->count() == 0)) {
@@ -640,8 +642,8 @@
 "      dart:something,SomeClass,doSomething                                  \n"
 "                                                                            \n"
 "  Supported options:                                                        \n"
-"    --vm_isolate_snapshot=<file>      A full snapshot is a compact          \n"
-"    --isolate_snapshot=<file>         representation of the dart vm isolate \n"
+"    --vm_snapshot_data=<file>         A full snapshot is a compact          \n"
+"    --isolate_snapshot_data=<file>    representation of the dart vm isolate \n"
 "                                      heap and dart isolate heap states.    \n"
 "                                      Both these options are required       \n"
 "                                                                            \n"
@@ -658,9 +660,10 @@
 "                                      assembly that must be linked into     \n"
 "                                      the target binary                     \n"
 "                                                                            \n"
-"    --instructions_blob=<file>        (Precompilation only) Contains the    \n"
-"    --rodata_blob=<file>              instructions and read-only data that  \n"
-"                                      must be mapped into the target binary \n"
+"    --vm_snapshot_instructions=<file> (Precompilation only) Contains the    \n"
+"    --isolate_snapshot_instructions=<file> instructions and read-only data  \n"
+"                                      that must be mapped into the target   \n"
+"                                      binary                                \n"
 "                                                                            \n"
 "    --embedder_entry_points_manifest=<file> (Precompilation or app          \n"
 "                                      snapshots) Contains embedder's entry  \n"
@@ -1027,21 +1030,23 @@
 static void CreateAndWriteSnapshot() {
   ASSERT(!IsSnapshottingForPrecompilation());
   Dart_Handle result;
-  uint8_t* vm_isolate_buffer = NULL;
-  intptr_t vm_isolate_size = 0;
-  uint8_t* isolate_buffer = NULL;
-  intptr_t isolate_size = 0;
+  uint8_t* vm_snapshot_data_buffer = NULL;
+  intptr_t vm_snapshot_data_size = 0;
+  uint8_t* isolate_snapshot_data_buffer = NULL;
+  intptr_t isolate_snapshot_data_size = 0;
 
   // First create a snapshot.
-  result = Dart_CreateSnapshot(&vm_isolate_buffer, &vm_isolate_size,
-                               &isolate_buffer, &isolate_size);
+  result = Dart_CreateSnapshot(&vm_snapshot_data_buffer, &vm_snapshot_data_size,
+                               &isolate_snapshot_data_buffer,
+                               &isolate_snapshot_data_size);
   CHECK_RESULT(result);
 
   // Now write the vm isolate and isolate snapshots out to the
   // specified file and exit.
-  WriteSnapshotFile(vm_isolate_snapshot_filename, vm_isolate_buffer,
-                    vm_isolate_size);
-  WriteSnapshotFile(isolate_snapshot_filename, isolate_buffer, isolate_size);
+  WriteSnapshotFile(vm_snapshot_data_filename, vm_snapshot_data_buffer,
+                    vm_snapshot_data_size);
+  WriteSnapshotFile(isolate_snapshot_data_filename,
+                    isolate_snapshot_data_buffer, isolate_snapshot_data_size);
   Dart_ExitScope();
 
   // Shutdown the isolate.
@@ -1068,26 +1073,31 @@
     CHECK_RESULT(result);
     WriteSnapshotFile(assembly_filename, assembly_buffer, assembly_size);
   } else {
-    uint8_t* vm_isolate_buffer = NULL;
-    intptr_t vm_isolate_size = 0;
-    uint8_t* isolate_buffer = NULL;
-    intptr_t isolate_size = 0;
-    uint8_t* instructions_blob_buffer = NULL;
-    intptr_t instructions_blob_size = 0;
-    uint8_t* rodata_blob_buffer = NULL;
-    intptr_t rodata_blob_size = 0;
+    uint8_t* vm_snapshot_data_buffer = NULL;
+    intptr_t vm_snapshot_data_size = 0;
+    uint8_t* vm_snapshot_instructions_buffer = NULL;
+    intptr_t vm_snapshot_instructions_size = 0;
+    uint8_t* isolate_snapshot_data_buffer = NULL;
+    intptr_t isolate_snapshot_data_size = 0;
+    uint8_t* isolate_snapshot_instructions_buffer = NULL;
+    intptr_t isolate_snapshot_instructions_size = 0;
     result = Dart_CreateAppAOTSnapshotAsBlobs(
-        &vm_isolate_buffer, &vm_isolate_size, &isolate_buffer, &isolate_size,
-        &instructions_blob_buffer, &instructions_blob_size, &rodata_blob_buffer,
-        &rodata_blob_size);
+        &vm_snapshot_data_buffer, &vm_snapshot_data_size,
+        &vm_snapshot_instructions_buffer, &vm_snapshot_instructions_size,
+        &isolate_snapshot_data_buffer, &isolate_snapshot_data_size,
+        &isolate_snapshot_instructions_buffer,
+        &isolate_snapshot_instructions_size);
     CHECK_RESULT(result);
-    WriteSnapshotFile(vm_isolate_snapshot_filename, vm_isolate_buffer,
-                      vm_isolate_size);
-    WriteSnapshotFile(isolate_snapshot_filename, isolate_buffer, isolate_size);
-    WriteSnapshotFile(instructions_blob_filename, instructions_blob_buffer,
-                      instructions_blob_size);
-    WriteSnapshotFile(rodata_blob_filename, rodata_blob_buffer,
-                      rodata_blob_size);
+    WriteSnapshotFile(vm_snapshot_data_filename, vm_snapshot_data_buffer,
+                      vm_snapshot_data_size);
+    WriteSnapshotFile(vm_snapshot_instructions_filename,
+                      vm_snapshot_instructions_buffer,
+                      vm_snapshot_instructions_size);
+    WriteSnapshotFile(isolate_snapshot_data_filename,
+                      isolate_snapshot_data_buffer, isolate_snapshot_data_size);
+    WriteSnapshotFile(isolate_snapshot_instructions_filename,
+                      isolate_snapshot_instructions_buffer,
+                      isolate_snapshot_instructions_size);
   }
 
   Dart_ExitScope();
@@ -1139,8 +1149,8 @@
   IsolateData* isolate_data =
       new IsolateData(script_uri, package_root, package_config);
   Dart_Isolate isolate = NULL;
-  isolate =
-      Dart_CreateIsolate(script_uri, main, NULL, NULL, isolate_data, error);
+  isolate = Dart_CreateIsolate(script_uri, main, NULL, NULL, NULL, isolate_data,
+                               error);
 
   if (isolate == NULL) {
     Log::PrintErr("Error: Could not create service isolate");
@@ -1243,7 +1253,7 @@
   IsolateData* isolate_data = new IsolateData(NULL, commandline_package_root,
                                               commandline_packages_file);
   Dart_Isolate isolate =
-      Dart_CreateIsolate(NULL, NULL, NULL, NULL, isolate_data, &error);
+      Dart_CreateIsolate(NULL, NULL, NULL, NULL, NULL, isolate_data, &error);
   if (isolate == NULL) {
     Log::PrintErr("Error: %s", error);
     free(error);
@@ -1257,8 +1267,8 @@
   result = Dart_SetEnvironmentCallback(EnvironmentCallback);
   CHECK_RESULT(result);
 
-  ASSERT(vm_isolate_snapshot_filename != NULL);
-  ASSERT(isolate_snapshot_filename != NULL);
+  ASSERT(vm_snapshot_data_filename != NULL);
+  ASSERT(isolate_snapshot_data_filename != NULL);
   // Load up the script before a snapshot is created.
   if (app_script_name != NULL) {
     // This is the case of a custom embedder (e.g: dartium) trying to
@@ -1305,7 +1315,8 @@
         is_kernel_file
             ? Dart_CreateIsolateFromKernel(NULL, NULL, kernel_program, NULL,
                                            isolate_data, &error)
-            : Dart_CreateIsolate(NULL, NULL, NULL, NULL, isolate_data, &error);
+            : Dart_CreateIsolate(NULL, NULL, NULL, NULL, NULL, isolate_data,
+                                 &error);
     if (isolate == NULL) {
       Log::PrintErr("%s", error);
       free(error);
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 18520de..b5f958d 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -34,14 +34,11 @@
 namespace dart {
 namespace bin {
 
-// vm_isolate_snapshot_buffer points to a snapshot for the vm isolate if we
-// link in a snapshot otherwise it is initialized to NULL.
-extern const uint8_t* vm_isolate_snapshot_buffer;
-
-// isolate_snapshot_buffer points to a snapshot for an isolate if we link in a
-// snapshot otherwise it is initialized to NULL.
-extern const uint8_t* core_isolate_snapshot_buffer;
-
+// Snapshot pieces if we link in a snapshot, otherwise initialized to NULL.
+extern const uint8_t* vm_snapshot_data;
+extern const uint8_t* vm_snapshot_instructions;
+extern const uint8_t* core_isolate_snapshot_data;
+extern const uint8_t* core_isolate_snapshot_instructions;
 
 /**
  * Global state used to control and store generation of application snapshots
@@ -98,10 +95,10 @@
 static bool use_blobs = false;
 
 
-extern const char* kPrecompiledVMIsolateSymbolName;
-extern const char* kPrecompiledIsolateSymbolName;
-extern const char* kPrecompiledInstructionsSymbolName;
-extern const char* kPrecompiledDataSymbolName;
+extern const char* kVmSnapshotDataSymbolName;
+extern const char* kVmSnapshotInstructionsSymbolName;
+extern const char* kIsolateSnapshotDataSymbolName;
+extern const char* kIsolateSnapshotInstructionsSymbolName;
 
 
 // Global flag that is used to indicate that we want to trace resolution of
@@ -110,7 +107,8 @@
 
 
 static char* app_script_uri = NULL;
-static const uint8_t* app_isolate_snapshot_buffer = NULL;
+static const uint8_t* app_isolate_snapshot_data = NULL;
+static const uint8_t* app_isolate_snapshot_instructions = NULL;
 
 
 static Dart_Isolate main_isolate = NULL;
@@ -835,17 +833,22 @@
 #if defined(DART_PRECOMPILED_RUNTIME)
   // AOT: All isolates start from the app snapshot.
   bool isolate_run_app_snapshot = true;
-  const uint8_t* isolate_snapshot_buffer = app_isolate_snapshot_buffer;
+  const uint8_t* isolate_snapshot_data = app_isolate_snapshot_data;
+  const uint8_t* isolate_snapshot_instructions =
+      app_isolate_snapshot_instructions;
 #else
-  // JIT: Main isolate starts from the app snapshot, if any. Other use the
-  // core libraries snapshot.
+  // JIT: Main isolate starts from the app snapshot, if any. Other isolates
+  // use the core libraries snapshot.
   bool isolate_run_app_snapshot = false;
-  const uint8_t* isolate_snapshot_buffer = core_isolate_snapshot_buffer;
-  if ((app_isolate_snapshot_buffer != NULL) &&
+  const uint8_t* isolate_snapshot_data = core_isolate_snapshot_data;
+  const uint8_t* isolate_snapshot_instructions =
+      core_isolate_snapshot_instructions;
+  if ((app_isolate_snapshot_data != NULL) &&
       (is_main_isolate || ((app_script_uri != NULL) &&
                            (strcmp(script_uri, app_script_uri) == 0)))) {
     isolate_run_app_snapshot = true;
-    isolate_snapshot_buffer = app_isolate_snapshot_buffer;
+    isolate_snapshot_data = app_isolate_snapshot_data;
+    isolate_snapshot_instructions = app_isolate_snapshot_instructions;
   }
 #endif
 
@@ -868,8 +871,9 @@
   Dart_Isolate isolate =
       is_kernel ? Dart_CreateIsolateFromKernel(script_uri, main, kernel_program,
                                                flags, isolate_data, error)
-                : Dart_CreateIsolate(script_uri, main, isolate_snapshot_buffer,
-                                     flags, isolate_data, error);
+                : Dart_CreateIsolate(script_uri, main, isolate_snapshot_data,
+                                     isolate_snapshot_instructions, flags,
+                                     isolate_data, error);
   if (isolate == NULL) {
     delete isolate_data;
     return NULL;
@@ -885,7 +889,7 @@
     Dart_Handle result = Dart_LoadKernel(kernel_program);
     CHECK_RESULT(result);
   }
-  if (is_kernel || (isolate_snapshot_buffer != NULL)) {
+  if (is_kernel || (isolate_snapshot_data != NULL)) {
     // Setup the native resolver as the snapshot does not carry it.
     Builtin::SetNativeResolver(Builtin::kBuiltinLibrary);
     Builtin::SetNativeResolver(Builtin::kIOLibrary);
@@ -1290,10 +1294,10 @@
 
 
 static bool ReadAppSnapshotBlobs(const char* script_name,
-                                 const uint8_t** vmisolate_buffer,
-                                 const uint8_t** isolate_buffer,
-                                 const uint8_t** instructions_buffer,
-                                 const uint8_t** rodata_buffer) {
+                                 const uint8_t** vm_data_buffer,
+                                 const uint8_t** vm_instructions_buffer,
+                                 const uint8_t** isolate_data_buffer,
+                                 const uint8_t** isolate_instructions_buffer) {
   File* file = File::Open(script_name, File::kRead);
   if (file == NULL) {
     return false;
@@ -1313,51 +1317,58 @@
     return false;
   }
 
-  int64_t vmisolate_size = header[1];
-  int64_t vmisolate_position =
+  int64_t vm_data_size = header[1];
+  int64_t vm_data_position =
       Utils::RoundUp(file->Position(), kAppSnapshotPageSize);
-  int64_t isolate_size = header[2];
-  int64_t isolate_position =
-      Utils::RoundUp(vmisolate_position + vmisolate_size, kAppSnapshotPageSize);
-  int64_t rodata_size = header[3];
-  int64_t rodata_position = isolate_position + isolate_size;
-  if (rodata_size != 0) {
-    rodata_position = Utils::RoundUp(rodata_position, kAppSnapshotPageSize);
+  int64_t vm_instructions_size = header[2];
+  int64_t vm_instructions_position = vm_data_position + vm_data_size;
+  if (vm_instructions_size != 0) {
+    vm_instructions_position =
+        Utils::RoundUp(vm_instructions_position, kAppSnapshotPageSize);
   }
-  int64_t instructions_size = header[4];
-  int64_t instructions_position = rodata_position + rodata_size;
-  if (instructions_size != 0) {
-    instructions_position =
-        Utils::RoundUp(instructions_position, kAppSnapshotPageSize);
+  int64_t isolate_data_size = header[3];
+  int64_t isolate_data_position = Utils::RoundUp(
+      vm_instructions_position + vm_instructions_size, kAppSnapshotPageSize);
+  int64_t isolate_instructions_size = header[4];
+  int64_t isolate_instructions_position =
+      isolate_data_position + isolate_data_size;
+  if (isolate_instructions_size != 0) {
+    isolate_instructions_position =
+        Utils::RoundUp(isolate_instructions_position, kAppSnapshotPageSize);
   }
 
-  void* read_only_buffer =
-      file->Map(File::kReadOnly, vmisolate_position,
-                instructions_position - vmisolate_position);
-  if (read_only_buffer == NULL) {
+  if (vm_data_size != 0) {
+    *vm_data_buffer = reinterpret_cast<const uint8_t*>(
+        file->Map(File::kReadOnly, vm_data_position, vm_data_size));
+    if (vm_data_buffer == NULL) {
+      Log::PrintErr("Failed to memory map snapshot\n");
+      Platform::Exit(kErrorExitCode);
+    }
+  }
+
+  if (vm_instructions_size != 0) {
+    *vm_instructions_buffer = reinterpret_cast<const uint8_t*>(file->Map(
+        File::kReadExecute, vm_instructions_position, vm_instructions_size));
+    if (*vm_instructions_buffer == NULL) {
+      Log::PrintErr("Failed to memory map snapshot\n");
+      Platform::Exit(kErrorExitCode);
+    }
+  }
+
+  *isolate_data_buffer = reinterpret_cast<const uint8_t*>(
+      file->Map(File::kReadOnly, isolate_data_position, isolate_data_size));
+  if (isolate_data_buffer == NULL) {
     Log::PrintErr("Failed to memory map snapshot\n");
     Platform::Exit(kErrorExitCode);
   }
 
-  if (vmisolate_size != 0) {
-    *vmisolate_buffer = reinterpret_cast<const uint8_t*>(read_only_buffer) +
-                        (vmisolate_position - vmisolate_position);
-  }
-  *isolate_buffer = reinterpret_cast<const uint8_t*>(read_only_buffer) +
-                    (isolate_position - vmisolate_position);
-  if (rodata_size == 0) {
-    *rodata_buffer = NULL;
+  if (isolate_instructions_size == 0) {
+    *isolate_instructions_buffer = NULL;
   } else {
-    *rodata_buffer = reinterpret_cast<const uint8_t*>(read_only_buffer) +
-                     (rodata_position - vmisolate_position);
-  }
-
-  if (instructions_size == 0) {
-    *instructions_buffer = NULL;
-  } else {
-    *instructions_buffer = reinterpret_cast<const uint8_t*>(
-        file->Map(File::kReadExecute, instructions_position, header[4]));
-    if (*instructions_buffer == NULL) {
+    *isolate_instructions_buffer = reinterpret_cast<const uint8_t*>(
+        file->Map(File::kReadExecute, isolate_instructions_position,
+                  isolate_instructions_size));
+    if (*isolate_instructions_buffer == NULL) {
       Log::PrintErr("Failed to memory map snapshot\n");
       Platform::Exit(kErrorExitCode);
     }
@@ -1368,70 +1379,79 @@
 }
 
 
-static bool ReadAppSnapshotDynamicLibrary(const char* script_name,
-                                          const uint8_t** vmisolate_buffer,
-                                          const uint8_t** isolate_buffer,
-                                          const uint8_t** instructions_buffer,
-                                          const uint8_t** rodata_buffer) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+static bool ReadAppSnapshotDynamicLibrary(
+    const char* script_name,
+    const uint8_t** vm_data_buffer,
+    const uint8_t** vm_instructions_buffer,
+    const uint8_t** isolate_data_buffer,
+    const uint8_t** isolate_instructions_buffer) {
   void* library = Extensions::LoadExtensionLibrary(script_name);
   if (library == NULL) {
     return false;
   }
 
-  *vmisolate_buffer = reinterpret_cast<const uint8_t*>(
-      Extensions::ResolveSymbol(library, kPrecompiledVMIsolateSymbolName));
-  if (*vmisolate_buffer == NULL) {
-    Log::PrintErr("Failed to resolve symbol '%s'\n",
-                  kPrecompiledVMIsolateSymbolName);
+  *vm_data_buffer = reinterpret_cast<const uint8_t*>(
+      Extensions::ResolveSymbol(library, kVmSnapshotDataSymbolName));
+  if (*vm_data_buffer == NULL) {
+    Log::PrintErr("Failed to resolve symbol '%s'\n", kVmSnapshotDataSymbolName);
     Platform::Exit(kErrorExitCode);
   }
 
-  *isolate_buffer = reinterpret_cast<const uint8_t*>(
-      Extensions::ResolveSymbol(library, kPrecompiledIsolateSymbolName));
-  if (*isolate_buffer == NULL) {
+  *vm_instructions_buffer = reinterpret_cast<const uint8_t*>(
+      Extensions::ResolveSymbol(library, kVmSnapshotInstructionsSymbolName));
+  if (*vm_instructions_buffer == NULL) {
     Log::PrintErr("Failed to resolve symbol '%s'\n",
-                  kPrecompiledIsolateSymbolName);
+                  kVmSnapshotInstructionsSymbolName);
     Platform::Exit(kErrorExitCode);
   }
 
-  *instructions_buffer = reinterpret_cast<const uint8_t*>(
-      Extensions::ResolveSymbol(library, kPrecompiledInstructionsSymbolName));
-  if (*instructions_buffer == NULL) {
+  *isolate_data_buffer = reinterpret_cast<const uint8_t*>(
+      Extensions::ResolveSymbol(library, kIsolateSnapshotDataSymbolName));
+  if (*isolate_data_buffer == NULL) {
     Log::PrintErr("Failed to resolve symbol '%s'\n",
-                  kPrecompiledInstructionsSymbolName);
+                  kIsolateSnapshotDataSymbolName);
     Platform::Exit(kErrorExitCode);
   }
 
-  *rodata_buffer = reinterpret_cast<const uint8_t*>(
-      Extensions::ResolveSymbol(library, kPrecompiledDataSymbolName));
-  if (*rodata_buffer == NULL) {
+  *isolate_instructions_buffer =
+      reinterpret_cast<const uint8_t*>(Extensions::ResolveSymbol(
+          library, kIsolateSnapshotInstructionsSymbolName));
+  if (*isolate_instructions_buffer == NULL) {
     Log::PrintErr("Failed to resolve symbol '%s'\n",
-                  kPrecompiledDataSymbolName);
+                  kIsolateSnapshotInstructionsSymbolName);
     Platform::Exit(kErrorExitCode);
   }
 
   return true;
 }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 
 
 static bool ReadAppSnapshot(const char* script_name,
-                            const uint8_t** vmisolate_buffer,
-                            const uint8_t** isolate_buffer,
-                            const uint8_t** instructions_buffer,
-                            const uint8_t** rodata_buffer) {
+                            const uint8_t** vm_data_buffer,
+                            const uint8_t** vm_instructions_buffer,
+                            const uint8_t** isolate_data_buffer,
+                            const uint8_t** isolate_instructions_buffer) {
   if (File::GetType(script_name, true) != File::kIsFile) {
     // If 'script_name' refers to a pipe, don't read to check for an app
     // snapshot since we cannot rewind if it isn't (and couldn't mmap it in
     // anyway if it was).
     return false;
   }
-  if (ReadAppSnapshotBlobs(script_name, vmisolate_buffer, isolate_buffer,
-                           instructions_buffer, rodata_buffer)) {
+  if (ReadAppSnapshotBlobs(script_name, vm_data_buffer, vm_instructions_buffer,
+                           isolate_data_buffer, isolate_instructions_buffer)) {
     return true;
   }
-  return ReadAppSnapshotDynamicLibrary(script_name, vmisolate_buffer,
-                                       isolate_buffer, instructions_buffer,
-                                       rodata_buffer);
+#if defined(DART_PRECOMPILED_RUNTIME)
+  // For testing AOT with the standalone embedder, we also support loading
+  // from a dynamic library to simulate what happens on iOS.
+  return ReadAppSnapshotDynamicLibrary(
+      script_name, vm_data_buffer, vm_instructions_buffer, isolate_data_buffer,
+      isolate_instructions_buffer);
+#else
+  return false;
+#endif  //  defined(DART_PRECOMPILED_RUNTIME)
 }
 
 
@@ -1441,47 +1461,48 @@
 
 
 static void WriteAppSnapshot(const char* filename,
-                             uint8_t* vmisolate_buffer,
-                             intptr_t vmisolate_size,
-                             uint8_t* isolate_buffer,
-                             intptr_t isolate_size,
-                             uint8_t* instructions_buffer,
-                             intptr_t instructions_size,
-                             uint8_t* rodata_buffer,
-                             intptr_t rodata_size) {
+                             uint8_t* vm_data_buffer,
+                             intptr_t vm_data_size,
+                             uint8_t* vm_instructions_buffer,
+                             intptr_t vm_instructions_size,
+                             uint8_t* isolate_data_buffer,
+                             intptr_t isolate_data_size,
+                             uint8_t* isolate_instructions_buffer,
+                             intptr_t isolate_instructions_size) {
   File* file = File::Open(filename, File::kWriteTruncate);
   if (file == NULL) {
     ErrorExit(kErrorExitCode, "Unable to write snapshot file '%s'\n", filename);
   }
 
   file->WriteFully(&kAppSnapshotMagicNumber, sizeof(kAppSnapshotMagicNumber));
-  WriteInt64(file, vmisolate_size);
-  WriteInt64(file, isolate_size);
-  WriteInt64(file, rodata_size);
-  WriteInt64(file, instructions_size);
+  WriteInt64(file, vm_data_size);
+  WriteInt64(file, vm_instructions_size);
+  WriteInt64(file, isolate_data_size);
+  WriteInt64(file, isolate_instructions_size);
   ASSERT(file->Position() == kAppSnapshotHeaderSize);
 
   file->SetPosition(Utils::RoundUp(file->Position(), kAppSnapshotPageSize));
-  if (!file->WriteFully(vmisolate_buffer, vmisolate_size)) {
+  if (!file->WriteFully(vm_data_buffer, vm_data_size)) {
     ErrorExit(kErrorExitCode, "Unable to write snapshot file '%s'\n", filename);
   }
 
-  file->SetPosition(Utils::RoundUp(file->Position(), kAppSnapshotPageSize));
-  if (!file->WriteFully(isolate_buffer, isolate_size)) {
-    ErrorExit(kErrorExitCode, "Unable to write snapshot file '%s'\n", filename);
-  }
-
-  if (rodata_size != 0) {
+  if (vm_instructions_size != 0) {
     file->SetPosition(Utils::RoundUp(file->Position(), kAppSnapshotPageSize));
-    if (!file->WriteFully(rodata_buffer, rodata_size)) {
+    if (!file->WriteFully(vm_instructions_buffer, vm_instructions_size)) {
       ErrorExit(kErrorExitCode, "Unable to write snapshot file '%s'\n",
                 filename);
     }
   }
 
-  if (instructions_size != 0) {
+  file->SetPosition(Utils::RoundUp(file->Position(), kAppSnapshotPageSize));
+  if (!file->WriteFully(isolate_data_buffer, isolate_data_size)) {
+    ErrorExit(kErrorExitCode, "Unable to write snapshot file '%s'\n", filename);
+  }
+
+  if (isolate_instructions_size != 0) {
     file->SetPosition(Utils::RoundUp(file->Position(), kAppSnapshotPageSize));
-    if (!file->WriteFully(instructions_buffer, instructions_size)) {
+    if (!file->WriteFully(isolate_instructions_buffer,
+                          isolate_instructions_size)) {
       ErrorExit(kErrorExitCode, "Unable to write snapshot file '%s'\n",
                 filename);
     }
@@ -1505,61 +1526,64 @@
 }
 
 
-static void GeneratePrecompiledSnapshot() {
-  uint8_t* vm_isolate_buffer = NULL;
-  intptr_t vm_isolate_size = 0;
-  uint8_t* isolate_buffer = NULL;
-  intptr_t isolate_size = 0;
-  uint8_t* assembly_buffer = NULL;
-  intptr_t assembly_size = 0;
-  uint8_t* instructions_blob_buffer = NULL;
-  intptr_t instructions_blob_size = 0;
-  uint8_t* rodata_blob_buffer = NULL;
-  intptr_t rodata_blob_size = 0;
-  Dart_Handle result;
-  if (use_blobs) {
-    result = Dart_CreateAppAOTSnapshotAsBlobs(
-        &vm_isolate_buffer, &vm_isolate_size, &isolate_buffer, &isolate_size,
-        &instructions_blob_buffer, &instructions_blob_size, &rodata_blob_buffer,
-        &rodata_blob_size);
-  } else {
-    result =
-        Dart_CreateAppAOTSnapshotAsAssembly(&assembly_buffer, &assembly_size);
-  }
+static void GenerateAppAOTSnapshotAsBlobs() {
+  uint8_t* vm_data_buffer = NULL;
+  intptr_t vm_data_size = 0;
+  uint8_t* vm_instructions_buffer = NULL;
+  intptr_t vm_instructions_size = 0;
+  uint8_t* isolate_data_buffer = NULL;
+  intptr_t isolate_data_size = 0;
+  uint8_t* isolate_instructions_buffer = NULL;
+  intptr_t isolate_instructions_size = 0;
+  Dart_Handle result = Dart_CreateAppAOTSnapshotAsBlobs(
+      &vm_data_buffer, &vm_data_size, &vm_instructions_buffer,
+      &vm_instructions_size, &isolate_data_buffer, &isolate_data_size,
+      &isolate_instructions_buffer, &isolate_instructions_size);
   if (Dart_IsError(result)) {
     ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
   }
+  WriteAppSnapshot(snapshot_filename, vm_data_buffer, vm_data_size,
+                   vm_instructions_buffer, vm_instructions_size,
+                   isolate_data_buffer, isolate_data_size,
+                   isolate_instructions_buffer, isolate_instructions_size);
+}
+
+static void GenerateAppAOTSnapshotAsAssembly() {
+  uint8_t* assembly_buffer = NULL;
+  intptr_t assembly_size = 0;
+  Dart_Handle result =
+      Dart_CreateAppAOTSnapshotAsAssembly(&assembly_buffer, &assembly_size);
+  if (Dart_IsError(result)) {
+    ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
+  }
+  WriteSnapshotFile(snapshot_filename, false, assembly_buffer, assembly_size);
+}
+
+
+static void GenerateAppAOTSnapshot() {
   if (use_blobs) {
-    WriteAppSnapshot(snapshot_filename, vm_isolate_buffer, vm_isolate_size,
-                     isolate_buffer, isolate_size, instructions_blob_buffer,
-                     instructions_blob_size, rodata_blob_buffer,
-                     rodata_blob_size);
+    GenerateAppAOTSnapshotAsBlobs();
   } else {
-    WriteSnapshotFile(snapshot_filename, false, assembly_buffer, assembly_size);
+    GenerateAppAOTSnapshotAsAssembly();
   }
 }
 
 
 static void GenerateAppJITSnapshot() {
 #if defined(TARGET_ARCH_X64)
-  uint8_t* vm_isolate_buffer = NULL;
-  intptr_t vm_isolate_size = 0;
-  uint8_t* isolate_buffer = NULL;
-  intptr_t isolate_size = 0;
-  uint8_t* instructions_blob_buffer = NULL;
-  intptr_t instructions_blob_size = 0;
-  uint8_t* rodata_blob_buffer = NULL;
-  intptr_t rodata_blob_size = 0;
+  uint8_t* isolate_data_buffer = NULL;
+  intptr_t isolate_data_size = 0;
+  uint8_t* isolate_instructions_buffer = NULL;
+  intptr_t isolate_instructions_size = 0;
   Dart_Handle result = Dart_CreateAppJITSnapshotAsBlobs(
-      &isolate_buffer, &isolate_size, &instructions_blob_buffer,
-      &instructions_blob_size, &rodata_blob_buffer, &rodata_blob_size);
+      &isolate_data_buffer, &isolate_data_size, &isolate_instructions_buffer,
+      &isolate_instructions_size);
   if (Dart_IsError(result)) {
     ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
   }
-  WriteAppSnapshot(snapshot_filename, vm_isolate_buffer, vm_isolate_size,
-                   isolate_buffer, isolate_size, instructions_blob_buffer,
-                   instructions_blob_size, rodata_blob_buffer,
-                   rodata_blob_size);
+  WriteAppSnapshot(snapshot_filename, NULL, 0, NULL, 0, isolate_data_buffer,
+                   isolate_data_size, isolate_instructions_buffer,
+                   isolate_instructions_size);
 #else
   uint8_t* isolate_buffer = NULL;
   intptr_t isolate_size = 0;
@@ -1570,8 +1594,8 @@
     ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
   }
 
-  WriteAppSnapshot(snapshot_filename, NULL, 0, isolate_buffer, isolate_size,
-                   NULL, 0, NULL, 0);
+  WriteAppSnapshot(snapshot_filename, NULL, 0, NULL, 0, isolate_buffer,
+                   isolate_size, NULL, 0);
 #endif  // defined(TARGET_ARCH_X64)
 }
 
@@ -1739,7 +1763,7 @@
     }
 
     if (gen_snapshot_kind == kAppAOT) {
-      GeneratePrecompiledSnapshot();
+      GenerateAppAOTSnapshot();
     } else {
       if (Dart_IsNull(root_lib)) {
         ErrorExit(kErrorExitCode, "Unable to find root library for '%s'\n",
@@ -1937,11 +1961,9 @@
     Platform::Exit(kErrorExitCode);
   }
 
-  const uint8_t* instructions_snapshot = NULL;
-  const uint8_t* data_snapshot = NULL;
-  if (ReadAppSnapshot(script_name, &vm_isolate_snapshot_buffer,
-                      &app_isolate_snapshot_buffer, &instructions_snapshot,
-                      &data_snapshot)) {
+  if (ReadAppSnapshot(script_name, &vm_snapshot_data, &vm_snapshot_instructions,
+                      &app_isolate_snapshot_data,
+                      &app_isolate_snapshot_instructions)) {
     vm_run_app_snapshot = true;
   }
 
@@ -1978,9 +2000,8 @@
   Dart_InitializeParams init_params;
   memset(&init_params, 0, sizeof(init_params));
   init_params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION;
-  init_params.vm_isolate_snapshot = vm_isolate_snapshot_buffer;
-  init_params.instructions_snapshot = instructions_snapshot;
-  init_params.data_snapshot = data_snapshot;
+  init_params.vm_snapshot_data = vm_snapshot_data;
+  init_params.vm_snapshot_instructions = vm_snapshot_instructions;
   init_params.create = CreateIsolateAndSetup;
   init_params.shutdown = ShutdownIsolate;
   init_params.file_open = DartUtils::OpenFile;
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index 3f621fe..c6e11b4 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -19,9 +19,10 @@
 // Defined in vm/os_thread_win.cc
 extern bool private_flag_windows_run_tls_destructors;
 
-// vm_isolate_snapshot_buffer points to a snapshot for the vm isolate if we
+// vm_snapshot_data_buffer points to a snapshot for the vm isolate if we
 // link in a snapshot otherwise it is initialized to NULL.
-extern const uint8_t* bin::vm_isolate_snapshot_buffer;
+extern const uint8_t* bin::vm_snapshot_data;
+extern const uint8_t* bin::vm_snapshot_instructions;
 
 // Only run tests that match the filter string. The default does not match any
 // tests.
@@ -108,10 +109,10 @@
       Flags::ProcessCommandLineFlags(dart_argc, dart_argv);
   ASSERT(set_vm_flags_success);
   const char* err_msg = Dart::InitOnce(
-      dart::bin::vm_isolate_snapshot_buffer, NULL, NULL, NULL, NULL, NULL,
-      dart::bin::DartUtils::OpenFile, dart::bin::DartUtils::ReadFile,
-      dart::bin::DartUtils::WriteFile, dart::bin::DartUtils::CloseFile, NULL,
-      NULL);
+      dart::bin::vm_snapshot_data, dart::bin::vm_snapshot_instructions, NULL,
+      NULL, NULL, dart::bin::DartUtils::OpenFile,
+      dart::bin::DartUtils::ReadFile, dart::bin::DartUtils::WriteFile,
+      dart::bin::DartUtils::CloseFile, NULL, NULL);
   ASSERT(err_msg == NULL);
   // Apply the filter to all registered tests.
   TestCaseBase::RunAll();
diff --git a/runtime/bin/snapshot_empty.cc b/runtime/bin/snapshot_empty.cc
index f2eef2f..6508bd9 100644
--- a/runtime/bin/snapshot_empty.cc
+++ b/runtime/bin/snapshot_empty.cc
@@ -16,8 +16,10 @@
 namespace dart {
 namespace bin {
 
-const uint8_t* vm_isolate_snapshot_buffer = NULL;
-const uint8_t* core_isolate_snapshot_buffer = NULL;
+const uint8_t* vm_snapshot_data = NULL;
+const uint8_t* vm_snapshot_instructions = NULL;
+const uint8_t* core_isolate_snapshot_data = NULL;
+const uint8_t* core_isolate_snapshot_instructions = NULL;
 
 }  // namespace bin
 }  // namespace dart
diff --git a/runtime/bin/snapshot_in.cc b/runtime/bin/snapshot_in.cc
index 861eeb4..8445c20 100644
--- a/runtime/bin/snapshot_in.cc
+++ b/runtime/bin/snapshot_in.cc
@@ -22,20 +22,22 @@
 // generated snapshot binary file for the vm isolate.
 // This string forms the content of a vm isolate snapshot which is loaded
 // into the vm isolate.
-static const uint8_t vm_isolate_snapshot_buffer_[] = {
+static const uint8_t vm_snapshot_data_[] = {
   %s
 };
-const uint8_t* vm_isolate_snapshot_buffer = vm_isolate_snapshot_buffer_;
+const uint8_t* vm_snapshot_data = vm_snapshot_data_;
+const uint8_t* vm_snapshot_instructions = NULL;
 
 
 // The string on the next line will be filled in with the contents of the
 // generated snapshot binary file for a regular dart isolate.
 // This string forms the content of a regular dart isolate snapshot which is
 // loaded into an isolate when it is created.
-static const uint8_t core_isolate_snapshot_buffer_[] = {
+static const uint8_t core_isolate_snapshot_data_[] = {
   %s
 };
-const uint8_t* core_isolate_snapshot_buffer = core_isolate_snapshot_buffer_;
+const uint8_t* core_isolate_snapshot_data = core_isolate_snapshot_data_;
+const uint8_t* core_isolate_snapshot_instructions = NULL;
 
 }  // namespace bin
 }  // namespace dart
diff --git a/runtime/bin/vmservice_dartium.cc b/runtime/bin/vmservice_dartium.cc
index 613b005..f3c91d9 100644
--- a/runtime/bin/vmservice_dartium.cc
+++ b/runtime/bin/vmservice_dartium.cc
@@ -47,7 +47,7 @@
   char* error = 0;
   Dart_Isolate isolate =
       Dart_CreateIsolate(DART_VM_SERVICE_ISOLATE_NAME, "main", snapshot_buffer,
-                         NULL, isolate_data, &error);
+                         NULL, NULL, isolate_data, &error);
   if (!isolate) {
     fprintf(stderr, "Dart_CreateIsolate failed: %s\n", error);
     return 0;
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 7bd749c..47ca849 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -773,7 +773,7 @@
  * The current version of the Dart_InitializeFlags. Should be incremented every
  * time Dart_InitializeFlags changes in a binary incompatible way.
  */
-#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000001)
+#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000002)
 
 /**
  * Describes how to initialize the VM. Used with Dart_Initialize.
@@ -794,9 +794,8 @@
  */
 typedef struct {
   int32_t version;
-  const uint8_t* vm_isolate_snapshot;
-  const uint8_t* instructions_snapshot;
-  const uint8_t* data_snapshot;
+  const uint8_t* vm_snapshot_data;
+  const uint8_t* vm_snapshot_instructions;
   Dart_IsolateCreateCallback create;
   Dart_IsolateShutdownCallback shutdown;
   Dart_ThreadExitCallback thread_exit;
@@ -864,8 +863,9 @@
  *   Provided only for advisory purposes to improve debugging messages.
  * \param main The name of the main entry point this isolate will run.
  *   Provided only for advisory purposes to improve debugging messages.
- * \param snapshot A buffer containing a snapshot of the isolate or
- *   NULL if no snapshot is provided.
+ * \param isolate_snapshot_data
+ * \param isolate_snapshot_instructions Buffers containing a snapshot of the
+ *   isolate or NULL if no snapshot is provided.
  * \param flags Pointer to VM specific flags or NULL for default flags.
  * \param callback_data Embedder data.  This data will be passed to
  *   the Dart_IsolateCreateCallback when new isolates are spawned from
@@ -875,12 +875,14 @@
  * \return The new isolate is returned. May be NULL if an error
  *   occurs during isolate initialization.
  */
-DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
-                                            const char* main,
-                                            const uint8_t* snapshot,
-                                            Dart_IsolateFlags* flags,
-                                            void* callback_data,
-                                            char** error);
+DART_EXPORT Dart_Isolate
+Dart_CreateIsolate(const char* script_uri,
+                   const char* main,
+                   const uint8_t* isolate_snapshot_data,
+                   const uint8_t* isolate_snapshot_instructions,
+                   Dart_IsolateFlags* flags,
+                   void* callback_data,
+                   char** error);
 /* TODO(turnidge): Document behavior when there is already a current
  * isolate. */
 
@@ -1009,10 +1011,10 @@
  * \return A valid handle if no error occurs during the operation.
  */
 DART_EXPORT Dart_Handle
-Dart_CreateSnapshot(uint8_t** vm_isolate_snapshot_buffer,
-                    intptr_t* vm_isolate_snapshot_size,
-                    uint8_t** isolate_snapshot_buffer,
-                    intptr_t* isolate_snapshot_size);
+Dart_CreateSnapshot(uint8_t** vm_snapshot_data_buffer,
+                    intptr_t* vm_snapshot_data_size,
+                    uint8_t** isolate_snapshot_data_buffer,
+                    intptr_t* isolate_snapshot_data_size);
 
 /**
  * Creates a snapshot of the application script loaded in the isolate.
@@ -1030,8 +1032,9 @@
  *
  * \return A valid handle if no error occurs during the operation.
  */
-DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
-                                                  intptr_t* size);
+DART_EXPORT Dart_Handle
+Dart_CreateScriptSnapshot(uint8_t** script_snapshot_buffer,
+                          intptr_t* script_snapshot_size);
 
 /**
  * Schedules an interrupt for the specified isolate.
@@ -2839,8 +2842,9 @@
  * \return If no error occurs, the Library object corresponding to the root
  *   script is returned. Otherwise an error handle is returned.
  */
-DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer,
-                                                    intptr_t buffer_len);
+DART_EXPORT Dart_Handle
+Dart_LoadScriptFromSnapshot(const uint8_t* script_snapshot_buffer,
+                            intptr_t script_snapshot_size);
 
 /**
  * Loads a dart application via an in-memory kernel program.
@@ -3218,14 +3222,18 @@
  *   - A root library must have been loaded.
  *   - Dart_Precompile must have been called.
  *
- *  Outputs an assembly file defining the symbols kVmIsolateSnapshot,
- *  kIsolateSnapshot, kInstructionsSnapshot and kDataSnapshot. The assembly
- *  should be compiled as a static or shared library and linked or loaded by the
- *  embedder.
+ *  Outputs an assembly file defining the symbols
+ *   - kDartVmSnapshotData
+ *   - kDartVmSnapshotInstructions
+ *   - kDartIsolateSnapshotData
+ *   - kDartIsolateSnapshotInstructions
+ *
+ *  The assembly should be compiled as a static or shared library and linked or
+ *  loaded by the embedder.
  *  Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT.
- *  The kVmIsolateSnapshot, kInstructionsSnapshot and kDataSnapshot should be
- *  passed as arguments to Dart_Initialize. The kIsolateSnapshot snapshot should
- *  be passed to Dart_CreateIsolate.
+ *  The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to
+ *  Dart_Initialize. The kDartIsolateSnapshotData and
+ *  kDartIsoalteSnapshotInstructions should be passed to Dart_CreateIsolate.
  *
  *  The buffers are scope allocated and are only valid until the next call to
  *  Dart_ExitScope.
@@ -3240,33 +3248,32 @@
 /**
  *  Same as Dart_CreateAppAOTSnapshotAsAssembly, except all the pieces are
  *  provided directly as bytes that the embedder can load with mmap. The
- *  instructions piece must be loaded with read and execute permissions; the
+ *  instructions pieces must be loaded with read and execute permissions; the
  *  other pieces may be loaded as read-only.
  */
 DART_EXPORT Dart_Handle
-Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_isolate_snapshot_buffer,
-                                 intptr_t* vm_isolate_snapshot_size,
-                                 uint8_t** isolate_snapshot_buffer,
-                                 intptr_t* isolate_snapshot_size,
-                                 uint8_t** instructions_blob_buffer,
-                                 intptr_t* instructions_blob_size,
-                                 uint8_t** rodata_blob_buffer,
-                                 intptr_t* rodata_blob_size);
+Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_snapshot_data_buffer,
+                                 intptr_t* vm_snapshot_data_size,
+                                 uint8_t** vm_snapshot_instructions_buffer,
+                                 intptr_t* vm_snapshot_instructions_size,
+                                 uint8_t** isolate_snapshot_data_buffer,
+                                 intptr_t* isolate_snapshot_data_size,
+                                 uint8_t** isolate_snapshot_instructions_buffer,
+                                 intptr_t* isolate_snapshot_instructions_size);
 
 
 /**
- *  Creates a snapshot that caches unoptimized code and type feedback for faster
+ *  Creates a snapshot that caches compiled code and type feedback for faster
  *  startup and quicker warmup in a subsequent process.
  *
- *  Outputs a snapshot in four pieces. The vm isolate snapshot,
- *  instructions_blob and rodata_blob should be passed as arguments to
- *  Dart_Initialize. The isolate snapshot should be passed to
- *  Dart_CreateIsolate. The instructions piece must be loaded with execute
- *  permissions; the other pieces may loaded as read-only.
+ *  Outputs a snapshot in two pieces. The pieces should be passed to
+ *  Dart_CreateIsolate in a VM using the same VM snapshot pieces used in the
+ *  current VM. The instructions piece must be loaded with read and execute
+ *  permissions; the data piece may be loaded as read-only.
  *
  *   - Requires the VM to have been started with --load-deferred-eagerly.
  *   - Requires the VM to have not been started with --precompilation.
- *   - Not supported when targeting IA32.
+ *   - Not supported when targeting IA32 or DBC.
  *   - The VM writing the snapshot and the VM reading the snapshot must be the
  *     same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must
  *     be targeting the same architecture, and must both be in checked mode or
@@ -3278,12 +3285,10 @@
  * \return A valid handle if no error occurs during the operation.
  */
 DART_EXPORT Dart_Handle
-Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_buffer,
-                                 intptr_t* isolate_snapshot_size,
-                                 uint8_t** instructions_blob_buffer,
-                                 intptr_t* instructions_blob_size,
-                                 uint8_t** rodata_blob_buffer,
-                                 intptr_t* rodata_blob_size);
+Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer,
+                                 intptr_t* isolate_snapshot_data_size,
+                                 uint8_t** isolate_snapshot_instructions_buffer,
+                                 intptr_t* isolate_snapshot_instructions_size);
 
 
 /**
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index 337fec1..5fc2a54 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -239,18 +239,29 @@
       // Get the parent function so that we get the right function name.
       func = func.parent_function();
 
+      bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value();
+      Dart_Port on_exit_port = onExit.IsNull() ? ILLEGAL_PORT : onExit.Id();
+      Dart_Port on_error_port = onError.IsNull() ? ILLEGAL_PORT : onError.Id();
+
+      // We first try to serialize the message.  In case the message is not
+      // serializable this will throw an exception.
+      SerializedObjectBuffer message_buffer;
+      {
+        MessageWriter writer(message_buffer.data_buffer(), &malloc_allocator,
+                             &malloc_deallocator,
+                             /* can_send_any_object = */ true,
+                             message_buffer.data_length());
+        writer.WriteMessage(message);
+      }
+
       const char* utf8_package_root =
           packageRoot.IsNull() ? NULL : String2UTF8(packageRoot);
       const char* utf8_package_config =
           packageConfig.IsNull() ? NULL : String2UTF8(packageConfig);
 
-      bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value();
-      Dart_Port on_exit_port = onExit.IsNull() ? ILLEGAL_PORT : onExit.Id();
-      Dart_Port on_error_port = onError.IsNull() ? ILLEGAL_PORT : onError.Id();
-
       IsolateSpawnState* state = new IsolateSpawnState(
           port.Id(), isolate->origin_id(), isolate->init_callback_data(),
-          String2UTF8(script_uri), func, message,
+          String2UTF8(script_uri), func, &message_buffer,
           isolate->spawn_count_monitor(), isolate->spawn_count(),
           utf8_package_root, utf8_package_config, paused.value(), fatal_errors,
           on_exit_port, on_error_port);
@@ -340,15 +351,37 @@
   GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(10));
   GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(11));
 
-  if (Dart::snapshot_kind() == Snapshot::kAppAOT) {
+  if (Dart::vm_snapshot_kind() == Snapshot::kAppAOT) {
     const Array& args = Array::Handle(Array::New(1));
     args.SetAt(
-        0, String::Handle(String::New(
-               "Isolate.spawnUri not supported when using AOT compilation")));
+        0,
+        String::Handle(String::New(
+            "Isolate.spawnUri is not supported when using AOT compilation")));
     Exceptions::ThrowByType(Exceptions::kUnsupported, args);
     UNREACHABLE();
   }
 
+  bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value();
+  Dart_Port on_exit_port = onExit.IsNull() ? ILLEGAL_PORT : onExit.Id();
+  Dart_Port on_error_port = onError.IsNull() ? ILLEGAL_PORT : onError.Id();
+
+  // We first try to serialize the arguments and the message.  In case the
+  // arguments or the message are not serializable this will throw an exception.
+  SerializedObjectBuffer arguments_buffer;
+  SerializedObjectBuffer message_buffer;
+  {
+    MessageWriter writer(
+        arguments_buffer.data_buffer(), &malloc_allocator, &malloc_deallocator,
+        /* can_send_any_object = */ false, arguments_buffer.data_length());
+    writer.WriteMessage(args);
+  }
+  {
+    MessageWriter writer(
+        message_buffer.data_buffer(), &malloc_allocator, &malloc_deallocator,
+        /* can_send_any_object = */ false, message_buffer.data_length());
+    writer.WriteMessage(message);
+  }
+
   // Canonicalize the uri with respect to the current isolate.
   const Library& root_lib =
       Library::Handle(isolate->object_store()->root_library());
@@ -364,15 +397,11 @@
   const char* utf8_package_config =
       packageConfig.IsNull() ? NULL : String2UTF8(packageConfig);
 
-  bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value();
-  Dart_Port on_exit_port = onExit.IsNull() ? ILLEGAL_PORT : onExit.Id();
-  Dart_Port on_error_port = onError.IsNull() ? ILLEGAL_PORT : onError.Id();
-
   IsolateSpawnState* state = new IsolateSpawnState(
       port.Id(), isolate->init_callback_data(), canonical_uri,
-      utf8_package_root, utf8_package_config, args, message,
-      isolate->spawn_count_monitor(), isolate->spawn_count(), paused.value(),
-      fatal_errors, on_exit_port, on_error_port);
+      utf8_package_root, utf8_package_config, &arguments_buffer,
+      &message_buffer, isolate->spawn_count_monitor(), isolate->spawn_count(),
+      paused.value(), fatal_errors, on_exit_port, on_error_port);
 
   // If we were passed a value then override the default flags state for
   // checked mode.
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 8a4078a..615699a 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -20,7 +20,7 @@
 
 namespace dart {
 
-#ifndef PRODUCT
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 
 #define PROPAGATE_IF_MALFORMED(type)                                           \
   if (type.IsMalformed()) {                                                    \
@@ -678,7 +678,7 @@
       return field.StaticValue();
     }
     // An uninitialized field was found.  Check for a getter in the field's
-    // owner classs.
+    // owner class.
     const Class& klass = Class::Handle(field.Owner());
     const String& internal_getter_name =
         String::Handle(Field::GetterName(getter_name));
@@ -2092,6 +2092,6 @@
   return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw();
 }
 
-#endif  // !PRODUCT
+#endif  // !PRODUCT && !DART_PRECOMPILED_RUNTIME
 
 }  // namespace dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index ccc9054..74a99ab 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -1508,7 +1508,7 @@
   final List<Thread> _threads = new List<Thread>();
 
   int get memoryHighWatermark => _memoryHighWatermark;
-  int _memoryHighWatermark;
+  int _memoryHighWatermark = 0;
 
   int get numZoneHandles => _numZoneHandles;
   int _numZoneHandles;
@@ -1645,10 +1645,13 @@
       threads.addAll(map['_threads']);
     }
 
-    _memoryHighWatermark = int.parse(map['_memoryHighWatermark']);
+    int currentMemoryHighWatermark = 0;
+    for (var i = 0; i < threads.length; i++) {
+      currentMemoryHighWatermark += threads[i].memoryHighWatermark;
+    }
 
-    if (map['threads'] != null) {
-      threads.addAll(map['threads']);
+    if (currentMemoryHighWatermark > _memoryHighWatermark) {
+      _memoryHighWatermark = currentMemoryHighWatermark;
     }
 
     _numZoneHandles = map['_numZoneHandles'];
diff --git a/runtime/observatory/tests/service/regress_28443_test.dart b/runtime/observatory/tests/service/regress_28443_test.dart
new file mode 100644
index 0000000..b135a6f
--- /dev/null
+++ b/runtime/observatory/tests/service/regress_28443_test.dart
@@ -0,0 +1,75 @@
+// 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 'test_helper.dart';
+import 'service_test_common.dart';
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+
+const int LINE_A = 28, LINE_B = 33;
+
+class VMServiceClient {
+  VMServiceClient(this.x);
+  close() => new Future.microtask(() => print("close"));
+  var x;
+}
+
+collect() async {
+  var uri = "abc";
+  var vmService;
+  await new Future.microtask(() async {
+    try {
+      vmService = new VMServiceClient(uri);
+      await new Future.microtask(() => throw new TimeoutException("here"));
+    } on dynamic {
+      vmService.close();
+      rethrow;  // LINE_A
+    }
+  });
+}
+
+test_code() async {  // LINE_B
+  try {
+    await collect();
+  } on TimeoutException {
+    print("ok");
+  }
+}
+
+Future<Isolate> stepThroughProgram(Isolate isolate) async {
+  Completer completer = new Completer();
+  int pauseEventsSeen = 0;
+
+  await subscribeToStream(isolate.vm, VM.kDebugStream,
+      (ServiceEvent event) async {
+    if (event.kind == ServiceEvent.kPauseBreakpoint) {
+      // We are paused: Step further.
+      pauseEventsSeen++;
+      isolate.stepInto();
+    } else if (event.kind == ServiceEvent.kPauseExit) {
+      // We are at the exit: The test is done.
+      expect(pauseEventsSeen > 20, true,
+          reason: "Saw only $pauseEventsSeen pause events.");
+      await cancelStreamSubscription(VM.kDebugStream);
+      completer.complete();
+    }
+  });
+  isolate.resume();
+  return completer.future;
+}
+
+var tests = [hasPausedAtStart,
+             setBreakpointAtLine(LINE_B),
+             resumeIsolate,
+             hasStoppedAtBreakpoint,
+             setBreakpointAtLine(LINE_A),
+             resumeIsolate,
+             hasStoppedAtBreakpoint,
+             stepOut,
+             stoppedAtLine(LINE_B),
+             resumeIsolate];
+
+main(args) => runIsolateTestsSynchronous(args, tests,
+    testeeConcurrent: test_code, pause_on_start: true, pause_on_exit: false);
diff --git a/runtime/platform/address_sanitizer.h b/runtime/platform/address_sanitizer.h
index ec8baf7..bc7359d 100644
--- a/runtime/platform/address_sanitizer.h
+++ b/runtime/platform/address_sanitizer.h
@@ -10,18 +10,40 @@
 // Allow the use of ASan (AddressSanitizer). This is needed as ASan needs to be
 // told about areas where the VM does the equivalent of a long-jump.
 #if defined(__has_feature)
+
 #if __has_feature(address_sanitizer)
 extern "C" void __asan_unpoison_memory_region(void*, size_t);
+extern "C" void __lsan_register_root_region(const void* p, size_t size);
+extern "C" void __lsan_unregister_root_region(const void* p, size_t size);
 #define ASAN_UNPOISON(ptr, len) __asan_unpoison_memory_region(ptr, len)
+#define LSAN_REGISTER_ROOT_REGION(ptr, len)                                    \
+  __lsan_register_root_region(ptr, len)
+#define LSAN_UNREGISTER_ROOT_REGION(ptr, len)                                  \
+  __lsan_unregister_root_region(ptr, len)
 #else  // __has_feature(address_sanitizer)
 #define ASAN_UNPOISON(ptr, len)                                                \
   do {                                                                         \
   } while (false && (ptr) == 0 && (len) == 0)
+#define LSAN_REGISTER_ROOT_REGION(ptr, len)                                    \
+  do {                                                                         \
+  } while (false && (ptr) == 0 && (len) == 0)
+#define LSAN_UNREGISTER_ROOT_REGION(ptr, len)                                  \
+  do {                                                                         \
+  } while (false && (ptr) == 0 && (len) == 0)
 #endif  // __has_feature(address_sanitizer)
+
 #else   // defined(__has_feature)
+
 #define ASAN_UNPOISON(ptr, len)                                                \
   do {                                                                         \
   } while (false && (ptr) == 0 && (len) == 0)
+#define LSAN_REGISTER_ROOT_REGION(ptr, len)                                    \
+  do {                                                                         \
+  } while (false && (ptr) == 0 && (len) == 0)
+#define LSAN_UNREGISTER_ROOT_REGION(ptr, len)                                  \
+  do {                                                                         \
+  } while (false && (ptr) == 0 && (len) == 0)
+
 #endif  // defined(__has_feature)
 
 #endif  // RUNTIME_PLATFORM_ADDRESS_SANITIZER_H_
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 101200b..d862a9e 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -248,6 +248,9 @@
 #define ARCH_IS_32_BIT 1
 #define kFpuRegisterSize 8
 typedef double fpu_register_t;
+#elif defined(__MIPSEB__)
+#error Big-endian MIPS is not supported by Dart. Try passing -EL to your      \
+ compiler.
 #elif defined(__aarch64__)
 #define HOST_ARCH_ARM64 1
 #define ARCH_IS_64_BIT 1
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index e946179..7ec8b8a 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -18,8 +18,8 @@
 cc/Fail1: Fail
 cc/Fail2: Fail
 
-cc/Dart2JSCompileAll: Crash # Issue 27369
-cc/Dart2JSCompilerStats: Crash # Issue 27369
+cc/Dart2JSCompileAll: Fail, Crash # Issue 27369
+cc/Dart2JSCompilerStats: Fail, Crash # Issue 27369
 
 cc/SNPrint_BadArgs: Skip
 
@@ -49,6 +49,43 @@
 cc/Dart2JSCompilerStats: Skip
 cc/CorelibCompilerStats: Skip
 
+[ $system == fuchsia ]
+# OOM crash can bring down the OS.
+dart/spawn_shutdown_test: Skip
+cc/CorelibIsolateStartup: Skip
+# TODO(zra): package:unittest is not in the image.
+dart/data_uri_spawn_test: Skip
+# ../../dart/runtime/bin/file_test.cc: 34: error: expected: !file->WriteByte(1)
+cc/Read: Fail  # TODO(zra): Investigate
+# Assumes initial thread's stack is the same size as spawned thread stacks.
+cc/StackOverflowStackTraceInfo: Crash
+# The profiler is turned off. Issue MG-430.
+cc/Profiler_AllocationSampleTest: Crash
+cc/Profiler_ArrayAllocation: Crash
+cc/Profiler_BasicSourcePosition: Crash
+cc/Profiler_BasicSourcePositionOptimized: Crash
+cc/Profiler_BinaryOperatorSourcePosition: Crash
+cc/Profiler_BinaryOperatorSourcePositionOptimized: Crash
+cc/Profiler_ChainedSamples: Crash
+cc/Profiler_ClosureAllocation: Crash
+cc/Profiler_CodeTicks: Crash
+cc/Profiler_ContextAllocation: Crash
+cc/Profiler_FunctionInline: Crash
+cc/Profiler_FunctionTicks: Crash
+cc/Profiler_InliningIntervalBoundry: Crash
+cc/Profiler_IntrinsicAllocation: Crash
+cc/Profiler_SampleBufferIterateTest: Crash
+cc/Profiler_SampleBufferWrapTest: Crash
+cc/Profiler_SourcePosition: Crash
+cc/Profiler_SourcePositionOptimized: Crash
+cc/Profiler_StringAllocation: Crash
+cc/Profiler_StringInterpolation: Crash
+cc/Profiler_ToggleRecordAllocation: Crash
+cc/Profiler_TrivialRecordAllocation: Crash
+cc/Profiler_TypedArrayAllocation: Crash
+cc/Profiler_GetSourceReport: Crash
+cc/Service_Profile: Fail
+
 # Profiler is completely disabled in SIMDBC builds.
 # On the simluator stack traces produced by the Profiler do not match
 # up with the real Dart stack trace and hence we don't get correct
@@ -150,10 +187,6 @@
 cc/CodeImmutability: Fail,OK # Address Sanitizer turns a crash into a failure.
 
 [ $builder_tag == asan && $arch == x64 ]
-cc/Log_Basic: Fail # Issue 28347
-cc/Log_Block: Fail # Issue 28347
-cc/Log_Macro: Fail # Issue 28347
-
 cc/Debug_DeleteBreakpoint: Fail # Issue 28348
 
 cc/IsolateReload_ChangeInstanceFormat7: Fail # Issue 28349
@@ -256,6 +289,9 @@
 # This test is meaningless for DBC as allocation stubs are not used.
 cc/RegenerateAllocStubs: Skip
 
+[ $arch == simdbc64 && $mode == release ]
+cc/UseDartApi: Pass,Crash # Issue 28499
+
 [ $hot_reload || $hot_reload_rollback ]
 dart/spawn_shutdown_test: Skip # We can shutdown an isolate before it reloads.
 dart/spawn_infinite_loop_test: Skip # We can shutdown an isolate before it reloads.
diff --git a/runtime/tools/create_snapshot_bin.py b/runtime/tools/create_snapshot_bin.py
index 65e56de..81f35aa 100755
--- a/runtime/tools/create_snapshot_bin.py
+++ b/runtime/tools/create_snapshot_bin.py
@@ -32,10 +32,6 @@
       action="store", type="string",
       help="output file name into which isolate snapshot in binary form " +
            "is generated")
-  result.add_option("--instructions_bin",
-      action="store", type="string",
-      help="output file name into which instructions snapshot in assembly " +
-           "form is generated")
   result.add_option("--embedder_entry_points_manifest",
       action="store", type="string",
       help="input manifest with the vm entry points in a precompiled snapshot")
@@ -120,14 +116,8 @@
     script_args.append(''.join([ "--packages=", options.packages]))
 
   # First setup the vm isolate and regular isolate snapshot output filename.
-  script_args.append(''.join([ "--vm_isolate_snapshot=",
-                               options.vm_output_bin ]))
-  script_args.append(''.join([ "--isolate_snapshot=", options.output_bin ]))
-
-  # Setup the instuctions snapshot output filename
-  if options.instructions_bin:
-    script_args.append(''.join([ "--instructions_snapshot=",
-                                 options.instructions_bin ]))
+  script_args.append(''.join([ "--vm_snapshot_data=", options.vm_output_bin ]))
+  script_args.append(''.join([ "--isolate_snapshot_data=", options.output_bin ]))
 
   # Specify the embedder entry points snapshot
   if options.embedder_entry_points_manifest:
diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc
index f630aae..57ff349 100644
--- a/runtime/vm/aot_optimizer.cc
+++ b/runtime/vm/aot_optimizer.cc
@@ -1572,7 +1572,14 @@
           new (Z) StaticCallInstr(call->token_pos(), target,
                                   Object::null_array(),  // argument_names
                                   args, call->deopt_id());
+      Environment* copy = call->env()->DeepCopy(
+          Z, call->env()->Length() - call->ArgumentCount());
+      for (intptr_t i = 0; i < args->length(); ++i) {
+        copy->PushValue(new (Z) Value((*args)[i]->value()->definition()));
+      }
+      call->RemoveEnvironment();
       ReplaceCall(call, new_call);
+      copy->DeepCopyTo(Z, new_call);
       return;
     }
   }
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index efe1223..83cd23f 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -95,9 +95,11 @@
 }
 
 
-Dart_Isolate Benchmark::CreateIsolate(const uint8_t* buffer) {
+Dart_Isolate Benchmark::CreateIsolate(const uint8_t* snapshot_data,
+                                      const uint8_t* snapshot_instructions) {
   char* err = NULL;
-  isolate_ = Dart_CreateIsolate(NULL, NULL, buffer, NULL, NULL, &err);
+  isolate_ = Dart_CreateIsolate(NULL, NULL, snapshot_data,
+                                snapshot_instructions, NULL, NULL, &err);
   EXPECT(isolate_ != NULL);
   free(err);
   return isolate_;
@@ -509,24 +511,25 @@
       "\n";
 
   // Start an Isolate, load a script and create a full snapshot.
-  uint8_t* vm_isolate_snapshot_buffer;
-  uint8_t* isolate_snapshot_buffer;
+  uint8_t* vm_snapshot_data_buffer;
+  uint8_t* isolate_snapshot_data_buffer;
   // Need to load the script into the dart: core library due to
   // the import of dart:_internal.
   TestCase::LoadCoreTestScript(kScriptChars, NULL);
   Api::CheckAndFinalizePendingClasses(thread);
 
   // Write snapshot with object content.
-  FullSnapshotWriter writer(Snapshot::kCore, &vm_isolate_snapshot_buffer,
-                            &isolate_snapshot_buffer, &malloc_allocator,
-                            NULL /* instructions_writer */);
+  FullSnapshotWriter writer(Snapshot::kCore, &vm_snapshot_data_buffer,
+                            &isolate_snapshot_data_buffer, &malloc_allocator,
+                            NULL, NULL /* image_writer */);
   writer.WriteFullSnapshot();
-  const Snapshot* snapshot = Snapshot::SetupFromBuffer(isolate_snapshot_buffer);
+  const Snapshot* snapshot =
+      Snapshot::SetupFromBuffer(isolate_snapshot_data_buffer);
   ASSERT(snapshot->kind() == Snapshot::kCore);
   benchmark->set_score(snapshot->length());
 
-  free(vm_isolate_snapshot_buffer);
-  free(isolate_snapshot_buffer);
+  free(vm_snapshot_data_buffer);
+  free(isolate_snapshot_data_buffer);
 }
 
 
@@ -546,24 +549,25 @@
       "\n";
 
   // Start an Isolate, load a script and create a full snapshot.
-  uint8_t* vm_isolate_snapshot_buffer;
-  uint8_t* isolate_snapshot_buffer;
+  uint8_t* vm_snapshot_data_buffer;
+  uint8_t* isolate_snapshot_data_buffer;
   // Need to load the script into the dart: core library due to
   // the import of dart:_internal.
   TestCase::LoadCoreTestScript(kScriptChars, NULL);
   Api::CheckAndFinalizePendingClasses(thread);
 
   // Write snapshot with object content.
-  FullSnapshotWriter writer(Snapshot::kCore, &vm_isolate_snapshot_buffer,
-                            &isolate_snapshot_buffer, &malloc_allocator,
-                            NULL /* instructions_writer */);
+  FullSnapshotWriter writer(Snapshot::kCore, &vm_snapshot_data_buffer,
+                            &isolate_snapshot_data_buffer, &malloc_allocator,
+                            NULL, NULL /* image_writer */);
   writer.WriteFullSnapshot();
-  const Snapshot* snapshot = Snapshot::SetupFromBuffer(isolate_snapshot_buffer);
+  const Snapshot* snapshot =
+      Snapshot::SetupFromBuffer(isolate_snapshot_data_buffer);
   ASSERT(snapshot->kind() == Snapshot::kCore);
   benchmark->set_score(snapshot->length());
 
-  free(vm_isolate_snapshot_buffer);
-  free(isolate_snapshot_buffer);
+  free(vm_snapshot_data_buffer);
+  free(isolate_snapshot_data_buffer);
 }
 
 
diff --git a/runtime/vm/benchmark_test.h b/runtime/vm/benchmark_test.h
index c304326..edc9bfc 100644
--- a/runtime/vm/benchmark_test.h
+++ b/runtime/vm/benchmark_test.h
@@ -20,13 +20,11 @@
 DECLARE_FLAG(int, old_gen_growth_space_ratio);
 
 namespace bin {
-// vm_isolate_snapshot_buffer points to a snapshot for the vm isolate if we
-// link in a snapshot otherwise it is initialized to NULL.
-extern const uint8_t* vm_isolate_snapshot_buffer;
-
-// isolate_snapshot_buffer points to a snapshot for an isolate if we link in a
-// snapshot otherwise it is initialized to NULL.
-extern const uint8_t* core_isolate_snapshot_buffer;
+// Snapshot pieces if we link in a snapshot, otherwise initialized to NULL.
+extern const uint8_t* vm_snapshot_data;
+extern const uint8_t* vm_snapshot_instructions;
+extern const uint8_t* core_isolate_snapshot_data;
+extern const uint8_t* core_isolate_snapshot_instructions;
 }
 
 // The BENCHMARK macros are used for benchmarking a specific functionality
@@ -82,7 +80,8 @@
   int64_t score() const { return score_; }
   Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); }
 
-  Dart_Isolate CreateIsolate(const uint8_t* buffer);
+  Dart_Isolate CreateIsolate(const uint8_t* snapshot_data,
+                             const uint8_t* snapshot_instructions);
 
   void Run() { (*run_)(this); }
   void RunBenchmark();
@@ -110,7 +109,8 @@
 class BenchmarkIsolateScope {
  public:
   explicit BenchmarkIsolateScope(Benchmark* benchmark) : benchmark_(benchmark) {
-    benchmark_->CreateIsolate(bin::core_isolate_snapshot_buffer);
+    benchmark_->CreateIsolate(bin::core_isolate_snapshot_data,
+                              bin::core_isolate_snapshot_instructions);
     Dart_EnterScope();  // Create a Dart API scope for unit benchmarks.
   }
   ~BenchmarkIsolateScope() {
diff --git a/runtime/vm/bootstrap_natives.cc b/runtime/vm/bootstrap_natives.cc
index ef4b92f..b6d5f2a 100644
--- a/runtime/vm/bootstrap_natives.cc
+++ b/runtime/vm/bootstrap_natives.cc
@@ -27,9 +27,9 @@
   Dart_NativeFunction function_;
   int argument_count_;
 } BootStrapEntries[] = {BOOTSTRAP_NATIVE_LIST(REGISTER_NATIVE_ENTRY)
-#ifndef PRODUCT
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
                             MIRRORS_BOOTSTRAP_NATIVE_LIST(REGISTER_NATIVE_ENTRY)
-#endif  // !PRODUCT
+#endif  // !PRODUCT && !DART_PRECOMPILED_RUNTIME
 };
 
 
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 725af06..89a1076 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -426,7 +426,7 @@
   static void DN_##name(Dart_NativeArguments args);
 
   BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE)
-#ifndef PRODUCT
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
   MIRRORS_BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE)
 #endif
 
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 51e3f3d..9929c3d 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -1662,8 +1662,7 @@
                                      is_vm_object);
 
       int32_t text_offset = d->Read<int32_t>();
-      RawInstructions* instr = reinterpret_cast<RawInstructions*>(
-          d->GetInstructionsAt(text_offset) + kHeapObjectTag);
+      RawInstructions* instr = d->GetInstructionsAt(text_offset);
 
       code->ptr()->entry_point_ = Instructions::UncheckedEntryPoint(instr);
       code->ptr()->checked_entry_point_ =
@@ -1674,8 +1673,7 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
       if (d->kind() == Snapshot::kAppJIT) {
         int32_t text_offset = d->Read<int32_t>();
-        RawInstructions* instr = reinterpret_cast<RawInstructions*>(
-            d->GetInstructionsAt(text_offset) + kHeapObjectTag);
+        RawInstructions* instr = d->GetInstructionsAt(text_offset);
         code->ptr()->active_instructions_ = instr;
         code->ptr()->entry_point_ = Instructions::UncheckedEntryPoint(instr);
         code->ptr()->checked_entry_point_ =
@@ -4468,13 +4466,13 @@
                        uint8_t** buffer,
                        ReAlloc alloc,
                        intptr_t initial_size,
-                       InstructionsWriter* instructions_writer)
+                       ImageWriter* image_writer)
     : StackResource(thread),
       heap_(thread->isolate()->heap()),
       zone_(thread->zone()),
       kind_(kind),
       stream_(buffer, alloc, initial_size),
-      instructions_writer_(instructions_writer),
+      image_writer_(image_writer),
       clusters_by_cid_(NULL),
       stack_(),
       num_cids_(0),
@@ -4795,8 +4793,8 @@
 }
 
 
-void Serializer::WriteFullSnapshot(intptr_t num_base_objects,
-                                   ObjectStore* object_store) {
+void Serializer::WriteIsolateSnapshot(intptr_t num_base_objects,
+                                      ObjectStore* object_store) {
   NoSafepointScope no_safepoint;
 
   if (num_base_objects == 0) {
@@ -5037,8 +5035,9 @@
     char* actual_features =
         OS::StrNDup(features, buffer_len < 128 ? buffer_len : 128);
     OS::SNPrint(message_buffer, kMessageBufferSize,
-                "Wrong features in snapshot, expected '%s' found '%s'",
-                expected_features, actual_features);
+                "Snapshot not compatible with the current VM configuration: "
+                "the snapshot requires '%s' but the VM has '%s'",
+                actual_features, expected_features);
     free(const_cast<char*>(expected_features));
     free(actual_features);
     // This can also fail while bringing up the VM isolate, so make sure to
@@ -5195,7 +5194,7 @@
 #endif
 }
 
-void Deserializer::ReadFullSnapshot(ObjectStore* object_store) {
+void Deserializer::ReadIsolateSnapshot(ObjectStore* object_store) {
   Array& refs = Array::Handle();
   Prepare();
 
@@ -5282,22 +5281,28 @@
 
 
 FullSnapshotWriter::FullSnapshotWriter(Snapshot::Kind kind,
-                                       uint8_t** vm_isolate_snapshot_buffer,
-                                       uint8_t** isolate_snapshot_buffer,
+                                       uint8_t** vm_snapshot_data_buffer,
+                                       uint8_t** isolate_snapshot_data_buffer,
                                        ReAlloc alloc,
-                                       InstructionsWriter* instructions_writer)
+                                       ImageWriter* vm_image_writer,
+                                       ImageWriter* isolate_image_writer)
     : thread_(Thread::Current()),
       kind_(kind),
-      vm_isolate_snapshot_buffer_(vm_isolate_snapshot_buffer),
-      isolate_snapshot_buffer_(isolate_snapshot_buffer),
+      vm_snapshot_data_buffer_(vm_snapshot_data_buffer),
+      isolate_snapshot_data_buffer_(isolate_snapshot_data_buffer),
       alloc_(alloc),
       vm_isolate_snapshot_size_(0),
       isolate_snapshot_size_(0),
-      instructions_writer_(instructions_writer),
+      vm_image_writer_(vm_image_writer),
+      isolate_image_writer_(isolate_image_writer),
       token_streams_(Array::Handle(zone())),
       saved_symbol_table_(Array::Handle(zone())),
-      new_vm_symbol_table_(Array::Handle(zone())) {
-  ASSERT(isolate_snapshot_buffer_ != NULL);
+      new_vm_symbol_table_(Array::Handle(zone())),
+      clustered_vm_size_(0),
+      clustered_isolate_size_(0),
+      mapped_data_size_(0),
+      mapped_instructions_size_(0) {
+  ASSERT(isolate_snapshot_data_buffer_ != NULL);
   ASSERT(alloc_ != NULL);
   ASSERT(isolate() != NULL);
   ASSERT(ClassFinalizer::AllClassesFinalized());
@@ -5313,7 +5318,7 @@
   // Can't have any mutation happening while we're serializing.
   ASSERT(isolate()->background_compiler() == NULL);
 
-  if (vm_isolate_snapshot_buffer != NULL) {
+  if (vm_snapshot_data_buffer != NULL) {
     NOT_IN_PRODUCT(TimelineDurationScope tds(
         thread(), Timeline::GetIsolateStream(), "PrepareNewVMIsolate"));
 
@@ -5357,90 +5362,114 @@
 }
 
 
-intptr_t FullSnapshotWriter::WriteVmIsolateSnapshot() {
+intptr_t FullSnapshotWriter::WriteVMSnapshot() {
   NOT_IN_PRODUCT(TimelineDurationScope tds(
-      thread(), Timeline::GetIsolateStream(), "WriteVmIsolateSnapshot"));
+      thread(), Timeline::GetIsolateStream(), "WriteVMSnapshot"));
 
-  ASSERT(vm_isolate_snapshot_buffer_ != NULL);
-  Serializer serializer(thread(), kind_, vm_isolate_snapshot_buffer_, alloc_,
-                        kInitialSize, instructions_writer_);
+  ASSERT(vm_snapshot_data_buffer_ != NULL);
+  Serializer serializer(thread(), kind_, vm_snapshot_data_buffer_, alloc_,
+                        kInitialSize, vm_image_writer_);
 
   serializer.ReserveHeader();
   serializer.WriteVersionAndFeatures();
-  /*
-   * Now Write out the following
-   * - the symbol table
-   * - all the token streams
-   * - the stub code (precompiled snapshots only)
-   **/
+  // VM snapshot roots are:
+  // - the symbol table
+  // - all the token streams
+  // - the stub code (precompiled snapshots only)
   intptr_t num_objects =
       serializer.WriteVMSnapshot(new_vm_symbol_table_, token_streams_);
   serializer.FillHeader(serializer.kind());
+  clustered_vm_size_ = serializer.bytes_written();
 
+  if (Snapshot::IncludesCode(kind_)) {
+    vm_image_writer_->Write(serializer.stream(), true);
+    mapped_data_size_ += vm_image_writer_->data_size();
+    mapped_instructions_size_ += vm_image_writer_->text_size();
+    vm_image_writer_->ResetOffsets();
+  }
+
+  // The clustered part + the direct mapped data part.
   vm_isolate_snapshot_size_ = serializer.bytes_written();
   return num_objects;
 }
 
 
-void FullSnapshotWriter::WriteIsolateFullSnapshot(intptr_t num_base_objects) {
+void FullSnapshotWriter::WriteIsolateSnapshot(intptr_t num_base_objects) {
   NOT_IN_PRODUCT(TimelineDurationScope tds(
-      thread(), Timeline::GetIsolateStream(), "WriteIsolateFullSnapshot"));
+      thread(), Timeline::GetIsolateStream(), "WriteIsolateSnapshot"));
 
-  Serializer serializer(thread(), kind_, isolate_snapshot_buffer_, alloc_,
-                        kInitialSize, instructions_writer_);
+  Serializer serializer(thread(), kind_, isolate_snapshot_data_buffer_, alloc_,
+                        kInitialSize, isolate_image_writer_);
   ObjectStore* object_store = isolate()->object_store();
   ASSERT(object_store != NULL);
 
   serializer.ReserveHeader();
   serializer.WriteVersionAndFeatures();
-  serializer.WriteFullSnapshot(num_base_objects, object_store);
+  // Isolate snapshot roots are:
+  // - the object store
+  serializer.WriteIsolateSnapshot(num_base_objects, object_store);
   serializer.FillHeader(serializer.kind());
+  clustered_isolate_size_ = serializer.bytes_written();
 
+  if (Snapshot::IncludesCode(kind_)) {
+    isolate_image_writer_->Write(serializer.stream(), false);
+    mapped_data_size_ += isolate_image_writer_->data_size();
+    mapped_instructions_size_ += isolate_image_writer_->text_size();
+    isolate_image_writer_->ResetOffsets();
+  }
+
+  // The clustered part + the direct mapped data part.
   isolate_snapshot_size_ = serializer.bytes_written();
 }
 
 
 void FullSnapshotWriter::WriteFullSnapshot() {
   intptr_t num_base_objects;
-  if (vm_isolate_snapshot_buffer() != NULL) {
-    num_base_objects = WriteVmIsolateSnapshot();
+  if (vm_snapshot_data_buffer() != NULL) {
+    num_base_objects = WriteVMSnapshot();
     ASSERT(num_base_objects != 0);
   } else {
     num_base_objects = 0;
   }
 
-  WriteIsolateFullSnapshot(num_base_objects);
+  WriteIsolateSnapshot(num_base_objects);
 
   if (FLAG_print_snapshot_sizes) {
-    OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize());
-    OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize());
-  }
-  intptr_t total_size = VmIsolateSnapshotSize() + IsolateSnapshotSize();
-
-  if (Snapshot::IncludesCode(kind_)) {
-    instructions_writer_->Write(
-        vm_isolate_snapshot_buffer_ == NULL ? NULL
-                                            : *vm_isolate_snapshot_buffer_,
-        vm_isolate_snapshot_size_, *isolate_snapshot_buffer_,
-        isolate_snapshot_size_);
-
-    if (FLAG_print_snapshot_sizes) {
-      OS::Print("ReadOnlyData(CodeSize): %" Pd "\n",
-                instructions_writer_->data_size());
-      OS::Print("Instructions(CodeSize): %" Pd "\n",
-                instructions_writer_->text_size());
-    }
-    total_size +=
-        instructions_writer_->data_size() + instructions_writer_->text_size();
-  }
-
-  if (FLAG_print_snapshot_sizes) {
-    OS::Print("Total(CodeSize): %" Pd "\n", total_size);
+    OS::Print("VMIsolate(CodeSize): %" Pd "\n", clustered_vm_size_);
+    OS::Print("Isolate(CodeSize): %" Pd "\n", clustered_isolate_size_);
+    OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", mapped_data_size_);
+    OS::Print("Instructions(CodeSize): %" Pd "\n", mapped_instructions_size_);
+    OS::Print("Total(CodeSize): %" Pd "\n",
+              clustered_vm_size_ + clustered_isolate_size_ + mapped_data_size_ +
+                  mapped_instructions_size_);
   }
 }
 
 
-RawApiError* IsolateSnapshotReader::ReadFullSnapshot() {
+static const uint8_t* DataBuffer(const Snapshot* snapshot) {
+  if (Snapshot::IncludesCode(snapshot->kind())) {
+    uword offset =
+        Utils::RoundUp(snapshot->length(), OS::kMaxPreferredCodeAlignment);
+    return snapshot->Addr() + offset;
+  }
+  return NULL;
+}
+
+
+FullSnapshotReader::FullSnapshotReader(const Snapshot* snapshot,
+                                       const uint8_t* instructions_buffer,
+                                       Thread* thread)
+    : kind_(snapshot->kind()),
+      thread_(thread),
+      buffer_(snapshot->content()),
+      size_(snapshot->length()),
+      instructions_buffer_(instructions_buffer),
+      data_buffer_(DataBuffer(snapshot)) {
+  thread->isolate()->set_compilation_allowed(kind_ != Snapshot::kAppAOT);
+}
+
+
+RawApiError* FullSnapshotReader::ReadVMSnapshot() {
   Deserializer deserializer(thread_, kind_, buffer_, size_,
                             instructions_buffer_, data_buffer_);
 
@@ -5449,13 +5478,22 @@
     return error;
   }
 
-  deserializer.ReadFullSnapshot(thread_->isolate()->object_store());
+  if (Snapshot::IncludesCode(kind_)) {
+    ASSERT(instructions_buffer_ != NULL);
+    thread_->isolate()->SetupImagePage(instructions_buffer_,
+                                       /* is_executable */ true);
+    ASSERT(data_buffer_ != NULL);
+    thread_->isolate()->SetupImagePage(data_buffer_,
+                                       /* is_executable */ false);
+  }
+
+  deserializer.ReadVMSnapshot();
 
   return ApiError::null();
 }
 
 
-RawApiError* VmIsolateSnapshotReader::ReadVmIsolateSnapshot() {
+RawApiError* FullSnapshotReader::ReadIsolateSnapshot() {
   Deserializer deserializer(thread_, kind_, buffer_, size_,
                             instructions_buffer_, data_buffer_);
 
@@ -5464,10 +5502,16 @@
     return error;
   }
 
-  deserializer.ReadVMSnapshot();
+  if (Snapshot::IncludesCode(kind_)) {
+    ASSERT(instructions_buffer_ != NULL);
+    thread_->isolate()->SetupImagePage(instructions_buffer_,
+                                       /* is_executable */ true);
+    ASSERT(data_buffer_ != NULL);
+    thread_->isolate()->SetupImagePage(data_buffer_,
+                                       /* is_executable */ false);
+  }
 
-  Dart::set_instructions_snapshot_buffer(instructions_buffer_);
-  Dart::set_data_snapshot_buffer(data_buffer_);
+  deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store());
 
   return ApiError::null();
 }
diff --git a/runtime/vm/clustered_snapshot.h b/runtime/vm/clustered_snapshot.h
index 4f7df53..e110f74 100644
--- a/runtime/vm/clustered_snapshot.h
+++ b/runtime/vm/clustered_snapshot.h
@@ -119,11 +119,12 @@
              uint8_t** buffer,
              ReAlloc alloc,
              intptr_t initial_size,
-             InstructionsWriter* instructions_writer_);
+             ImageWriter* image_writer_);
   ~Serializer();
 
   intptr_t WriteVMSnapshot(const Array& symbols, const Array& scripts);
-  void WriteFullSnapshot(intptr_t num_base_objects, ObjectStore* object_store);
+  void WriteIsolateSnapshot(intptr_t num_base_objects,
+                            ObjectStore* object_store);
 
   void AddVMIsolateBaseObjects();
 
@@ -206,6 +207,7 @@
   void WriteVersionAndFeatures();
 
   void Serialize();
+  WriteStream* stream() { return &stream_; }
   intptr_t bytes_written() { return stream_.bytes_written(); }
 
   // Writes raw data to the stream (basic type).
@@ -257,11 +259,11 @@
   }
 
   int32_t GetTextOffset(RawInstructions* instr, RawCode* code) {
-    return instructions_writer_->GetOffsetFor(instr, code);
+    return image_writer_->GetOffsetFor(instr, code);
   }
 
   int32_t GetRODataOffset(RawObject* object) {
-    return instructions_writer_->GetObjectOffsetFor(object);
+    return image_writer_->GetObjectOffsetFor(object);
   }
 
   Snapshot::Kind kind() const { return kind_; }
@@ -271,7 +273,7 @@
   Zone* zone_;
   Snapshot::Kind kind_;
   WriteStream stream_;
-  InstructionsWriter* instructions_writer_;
+  ImageWriter* image_writer_;
   SerializationCluster** clusters_by_cid_;
   GrowableArray<RawObject*> stack_;
   intptr_t num_cids_;
@@ -294,7 +296,7 @@
                const uint8_t* data_buffer);
   ~Deserializer();
 
-  void ReadFullSnapshot(ObjectStore* object_store);
+  void ReadIsolateSnapshot(ObjectStore* object_store);
   void ReadVMSnapshot();
 
   void AddVMIsolateBaseObjects();
@@ -350,7 +352,7 @@
     return Read<int32_t>();
   }
 
-  uword GetInstructionsAt(int32_t offset) {
+  RawInstructions* GetInstructionsAt(int32_t offset) {
     return instructions_reader_->GetInstructionsAt(offset);
   }
 
@@ -387,17 +389,18 @@
  public:
   static const intptr_t kInitialSize = 64 * KB;
   FullSnapshotWriter(Snapshot::Kind kind,
-                     uint8_t** vm_isolate_snapshot_buffer,
-                     uint8_t** isolate_snapshot_buffer,
+                     uint8_t** vm_snapshot_data_buffer,
+                     uint8_t** isolate_snapshot_data_buffer,
                      ReAlloc alloc,
-                     InstructionsWriter* instructions_writer);
+                     ImageWriter* vm_image_writer,
+                     ImageWriter* iso_image_writer);
   ~FullSnapshotWriter();
 
-  uint8_t** vm_isolate_snapshot_buffer() const {
-    return vm_isolate_snapshot_buffer_;
-  }
+  uint8_t** vm_snapshot_data_buffer() const { return vm_snapshot_data_buffer_; }
 
-  uint8_t** isolate_snapshot_buffer() const { return isolate_snapshot_buffer_; }
+  uint8_t** isolate_snapshot_data_buffer() const {
+    return isolate_snapshot_data_buffer_;
+  }
 
   Thread* thread() const { return thread_; }
   Zone* zone() const { return thread_->zone(); }
@@ -412,48 +415,44 @@
 
  private:
   // Writes a snapshot of the VM Isolate.
-  intptr_t WriteVmIsolateSnapshot();
+  intptr_t WriteVMSnapshot();
 
   // Writes a full snapshot of a regular Dart Isolate.
-  void WriteIsolateFullSnapshot(intptr_t num_base_objects);
+  void WriteIsolateSnapshot(intptr_t num_base_objects);
 
   Thread* thread_;
   Snapshot::Kind kind_;
-  uint8_t** vm_isolate_snapshot_buffer_;
-  uint8_t** isolate_snapshot_buffer_;
+  uint8_t** vm_snapshot_data_buffer_;
+  uint8_t** isolate_snapshot_data_buffer_;
   ReAlloc alloc_;
   intptr_t vm_isolate_snapshot_size_;
   intptr_t isolate_snapshot_size_;
   ForwardList* forward_list_;
-  InstructionsWriter* instructions_writer_;
+  ImageWriter* vm_image_writer_;
+  ImageWriter* isolate_image_writer_;
   Array& token_streams_;
   Array& saved_symbol_table_;
   Array& new_vm_symbol_table_;
 
+  // Stats for benchmarking.
+  intptr_t clustered_vm_size_;
+  intptr_t clustered_isolate_size_;
+  intptr_t mapped_data_size_;
+  intptr_t mapped_instructions_size_;
+
   DISALLOW_COPY_AND_ASSIGN(FullSnapshotWriter);
 };
 
 
-class VmIsolateSnapshotReader {
+class FullSnapshotReader {
  public:
-  VmIsolateSnapshotReader(Snapshot::Kind kind,
-                          const uint8_t* buffer,
-                          intptr_t size,
-                          const uint8_t* instructions_buffer,
-                          const uint8_t* data_buffer,
-                          Thread* thread)
-      : kind_(kind),
-        thread_(thread),
-        buffer_(buffer),
-        size_(size),
-        instructions_buffer_(instructions_buffer),
-        data_buffer_(data_buffer) {
-    thread->isolate()->set_compilation_allowed(kind != Snapshot::kAppAOT);
-  }
+  FullSnapshotReader(const Snapshot* snapshot,
+                     const uint8_t* instructions_buffer,
+                     Thread* thread);
+  ~FullSnapshotReader() {}
 
-  ~VmIsolateSnapshotReader() {}
-
-  RawApiError* ReadVmIsolateSnapshot();
+  RawApiError* ReadVMSnapshot();
+  RawApiError* ReadIsolateSnapshot();
 
  private:
   Snapshot::Kind kind_;
@@ -463,40 +462,7 @@
   const uint8_t* instructions_buffer_;
   const uint8_t* data_buffer_;
 
-  DISALLOW_COPY_AND_ASSIGN(VmIsolateSnapshotReader);
-};
-
-
-class IsolateSnapshotReader {
- public:
-  IsolateSnapshotReader(Snapshot::Kind kind,
-                        const uint8_t* buffer,
-                        intptr_t size,
-                        const uint8_t* instructions_buffer,
-                        const uint8_t* data_buffer,
-                        Thread* thread)
-      : kind_(kind),
-        thread_(thread),
-        buffer_(buffer),
-        size_(size),
-        instructions_buffer_(instructions_buffer),
-        data_buffer_(data_buffer) {
-    thread->isolate()->set_compilation_allowed(kind != Snapshot::kAppAOT);
-  }
-
-  ~IsolateSnapshotReader() {}
-
-  RawApiError* ReadFullSnapshot();
-
- private:
-  Snapshot::Kind kind_;
-  Thread* thread_;
-  const uint8_t* buffer_;
-  intptr_t size_;
-  const uint8_t* instructions_buffer_;
-  const uint8_t* data_buffer_;
-
-  DISALLOW_COPY_AND_ASSIGN(IsolateSnapshotReader);
+  DISALLOW_COPY_AND_ASSIGN(FullSnapshotReader);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 495277c..6e4cd11 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -2256,14 +2256,6 @@
 }
 
 
-void SinCos(double arg, double* cos_res, double* sin_res) {
-  // The compiler may merge the calls to sincos, if supported. This
-  // typically occurs only when compiling for 64-bit targets.
-  *cos_res = cos(arg);
-  *sin_res = sin(arg);
-}
-
-
 // Update global type feedback recorded for a field recording the assignment
 // of the given value.
 //   Arg0: Field object;
diff --git a/runtime/vm/code_generator.h b/runtime/vm/code_generator.h
index 65b8ca1..e9425a6 100644
--- a/runtime/vm/code_generator.h
+++ b/runtime/vm/code_generator.h
@@ -22,7 +22,6 @@
 void DeoptimizeFunctionsOnStack();
 
 double DartModulo(double a, double b);
-void SinCos(double arg, double* sin_res, double* cos_res);
 
 }  // namespace dart
 
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 57f5cbe..c72d431 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -48,9 +48,7 @@
 ThreadPool* Dart::thread_pool_ = NULL;
 DebugInfo* Dart::pprof_symbol_generator_ = NULL;
 ReadOnlyHandles* Dart::predefined_handles_ = NULL;
-Snapshot::Kind Dart::snapshot_kind_ = Snapshot::kInvalid;
-const uint8_t* Dart::instructions_snapshot_buffer_ = NULL;
-const uint8_t* Dart::data_snapshot_buffer_ = NULL;
+Snapshot::Kind Dart::vm_snapshot_kind_ = Snapshot::kInvalid;
 Dart_ThreadExitCallback Dart::thread_exit_callback_ = NULL;
 Dart_FileOpenCallback Dart::file_open_callback_ = NULL;
 Dart_FileReadCallback Dart::file_read_callback_ = NULL;
@@ -124,7 +122,6 @@
 
 char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
                      const uint8_t* instructions_snapshot,
-                     const uint8_t* data_snapshot,
                      Dart_IsolateCreateCallback create,
                      Dart_IsolateShutdownCallback shutdown,
                      Dart_ThreadExitCallback thread_exit,
@@ -213,10 +210,10 @@
       if (snapshot == NULL) {
         return strdup("Invalid vm isolate snapshot seen");
       }
-      snapshot_kind_ = snapshot->kind();
+      vm_snapshot_kind_ = snapshot->kind();
 
-      if (Snapshot::IncludesCode(snapshot_kind_)) {
-        if (snapshot_kind_ == Snapshot::kAppAOT) {
+      if (Snapshot::IncludesCode(vm_snapshot_kind_)) {
+        if (vm_snapshot_kind_ == Snapshot::kAppAOT) {
 #if defined(DART_PRECOMPILED_RUNTIME)
           vm_isolate_->set_compilation_allowed(false);
           if (!FLAG_precompiled_runtime) {
@@ -229,10 +226,7 @@
         if (instructions_snapshot == NULL) {
           return strdup("Missing instructions snapshot");
         }
-        if (data_snapshot == NULL) {
-          return strdup("Missing rodata snapshot");
-        }
-      } else if (Snapshot::IsFull(snapshot_kind_)) {
+      } else if (Snapshot::IsFull(vm_snapshot_kind_)) {
 #if defined(DART_PRECOMPILED_RUNTIME)
         return strdup("Precompiled runtime requires a precompiled snapshot");
 #else
@@ -241,16 +235,8 @@
       } else {
         return strdup("Invalid vm isolate snapshot seen");
       }
-      if (instructions_snapshot != NULL) {
-        vm_isolate_->SetupInstructionsSnapshotPage(instructions_snapshot);
-      }
-      if (instructions_snapshot != NULL) {
-        vm_isolate_->SetupDataSnapshotPage(data_snapshot);
-      }
-      VmIsolateSnapshotReader reader(snapshot->kind(), snapshot->content(),
-                                     snapshot->length(), instructions_snapshot,
-                                     data_snapshot, T);
-      const Error& error = Error::Handle(reader.ReadVmIsolateSnapshot());
+      FullSnapshotReader reader(snapshot, instructions_snapshot, T);
+      const Error& error = Error::Handle(reader.ReadVMSnapshot());
       if (!error.IsNull()) {
         // Must copy before leaving the zone.
         return strdup(error.ToErrorCString());
@@ -281,7 +267,7 @@
 #elif !defined(DART_NO_SNAPSHOT)
       return strdup("Missing vm isolate snapshot");
 #else
-      snapshot_kind_ = Snapshot::kNone;
+      vm_snapshot_kind_ = Snapshot::kNone;
       StubCode::InitOnce();
       Symbols::InitOnce(vm_isolate_);
 #endif
@@ -504,7 +490,17 @@
 }
 
 
-RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer,
+static bool IsSnapshotCompatible(Snapshot::Kind vm_kind,
+                                 Snapshot::Kind isolate_kind) {
+  if (vm_kind == isolate_kind) return true;
+  if (vm_kind == Snapshot::kCore && isolate_kind == Snapshot::kAppJIT)
+    return true;
+  return Snapshot::IsFull(isolate_kind);
+}
+
+
+RawError* Dart::InitializeIsolate(const uint8_t* snapshot_data,
+                                  const uint8_t* snapshot_instructions,
                                   intptr_t snapshot_length,
                                   kernel::Program* kernel_program,
                                   void* data) {
@@ -529,33 +525,28 @@
   if (!error.IsNull()) {
     return error.raw();
   }
-  if ((snapshot_buffer != NULL) && kernel_program == NULL) {
+  if ((snapshot_data != NULL) && kernel_program == NULL) {
     // Read the snapshot and setup the initial state.
     NOT_IN_PRODUCT(TimelineDurationScope tds(T, Timeline::GetIsolateStream(),
                                              "IsolateSnapshotReader"));
     // TODO(turnidge): Remove once length is not part of the snapshot.
-    const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer);
+    const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_data);
     if (snapshot == NULL) {
       const String& message = String::Handle(String::New("Invalid snapshot"));
       return ApiError::New(message);
     }
-    if (snapshot->kind() != snapshot_kind_ &&
-        !((snapshot->kind() == Snapshot::kAppJIT) &&
-          (snapshot_kind_ == Snapshot::kCore))) {
-      const String& message = String::Handle(
-          String::NewFormatted("Invalid snapshot kind: got '%s', expected '%s'",
-                               Snapshot::KindToCString(snapshot->kind()),
-                               Snapshot::KindToCString(snapshot_kind_)));
+    if (!IsSnapshotCompatible(vm_snapshot_kind_, snapshot->kind())) {
+      const String& message = String::Handle(String::NewFormatted(
+          "Incompatible snapshot kinds: vm '%s', isolate '%s'",
+          Snapshot::KindToCString(vm_snapshot_kind_),
+          Snapshot::KindToCString(snapshot->kind())));
       return ApiError::New(message);
     }
-    ASSERT(Snapshot::IsFull(snapshot->kind()));
     if (FLAG_trace_isolates) {
       OS::Print("Size of isolate snapshot = %" Pd "\n", snapshot->length());
     }
-    IsolateSnapshotReader reader(
-        snapshot->kind(), snapshot->content(), snapshot->length(),
-        Dart::instructions_snapshot_buffer(), Dart::data_snapshot_buffer(), T);
-    const Error& error = Error::Handle(reader.ReadFullSnapshot());
+    FullSnapshotReader reader(snapshot, snapshot_instructions, T);
+    const Error& error = Error::Handle(reader.ReadIsolateSnapshot());
     if (!error.IsNull()) {
       return error.raw();
     }
@@ -572,7 +563,7 @@
       MegamorphicCacheTable::PrintSizes(I);
     }
   } else {
-    if ((snapshot_kind_ != Snapshot::kNone) && kernel_program == NULL) {
+    if ((vm_snapshot_kind_ != Snapshot::kNone) && kernel_program == NULL) {
       const String& message =
           String::Handle(String::New("Missing isolate snapshot"));
       return ApiError::New(message);
@@ -603,7 +594,7 @@
       Code::Handle(I->object_store()->megamorphic_miss_code());
   I->set_ic_miss_code(miss_code);
 
-  if ((snapshot_buffer == NULL) || (kernel_program != NULL)) {
+  if ((snapshot_data == NULL) || (kernel_program != NULL)) {
     const Error& error = Error::Handle(I->object_store()->PreallocateObjects());
     if (!error.IsNull()) {
       return error.raw();
diff --git a/runtime/vm/dart.h b/runtime/vm/dart.h
index 934f68a..b4376dd 100644
--- a/runtime/vm/dart.h
+++ b/runtime/vm/dart.h
@@ -24,9 +24,8 @@
 
 class Dart : public AllStatic {
  public:
-  static char* InitOnce(const uint8_t* vm_isolate_snapshot,
-                        const uint8_t* instructions_snapshot,
-                        const uint8_t* data_snapshot,
+  static char* InitOnce(const uint8_t* vm_snapshot_data,
+                        const uint8_t* vm_snapshot_instructions,
                         Dart_IsolateCreateCallback create,
                         Dart_IsolateShutdownCallback shutdown,
                         Dart_ThreadExitCallback thread_exit,
@@ -45,7 +44,8 @@
   // from SDK library sources.  If the snapshot_buffer is non-NULL,
   // initialize from a snapshot or a Kernel binary depending on the value of
   // from_kernel.  Otherwise, initialize from sources.
-  static RawError* InitializeIsolate(const uint8_t* snapshot_buffer,
+  static RawError* InitializeIsolate(const uint8_t* snapshot_data,
+                                     const uint8_t* snapshot_instructions,
                                      intptr_t snapshot_length,
                                      kernel::Program* kernel_program,
                                      void* data);
@@ -73,18 +73,7 @@
   static bool IsReadOnlyHandle(uword address);
 
   static const char* FeaturesString(Snapshot::Kind kind);
-
-  static Snapshot::Kind snapshot_kind() { return snapshot_kind_; }
-  static const uint8_t* instructions_snapshot_buffer() {
-    return instructions_snapshot_buffer_;
-  }
-  static void set_instructions_snapshot_buffer(const uint8_t* buffer) {
-    instructions_snapshot_buffer_ = buffer;
-  }
-  static const uint8_t* data_snapshot_buffer() { return data_snapshot_buffer_; }
-  static void set_data_snapshot_buffer(const uint8_t* buffer) {
-    data_snapshot_buffer_ = buffer;
-  }
+  static Snapshot::Kind vm_snapshot_kind() { return vm_snapshot_kind_; }
 
   static Dart_ThreadExitCallback thread_exit_callback() {
     return thread_exit_callback_;
@@ -131,9 +120,7 @@
   static ThreadPool* thread_pool_;
   static DebugInfo* pprof_symbol_generator_;
   static ReadOnlyHandles* predefined_handles_;
-  static Snapshot::Kind snapshot_kind_;
-  static const uint8_t* instructions_snapshot_buffer_;
-  static const uint8_t* data_snapshot_buffer_;
+  static Snapshot::Kind vm_snapshot_kind_;
   static Dart_ThreadExitCallback thread_exit_callback_;
   static Dart_FileOpenCallback file_open_callback_;
   static Dart_FileReadCallback file_read_callback_;
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 50c30ce..2b4b954 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -534,6 +534,22 @@
 }
 
 
+bool Api::IsValid(Dart_Handle handle) {
+  Isolate* isolate = Isolate::Current();
+  CHECK_ISOLATE(isolate);
+
+  // Check against all of the handles in the current isolate as well as the
+  // read-only handles.
+  return isolate->thread_registry()->IsValidHandle(handle) ||
+         isolate->api_state()->IsActivePersistentHandle(
+             reinterpret_cast<Dart_PersistentHandle>(handle)) ||
+         isolate->api_state()->IsActiveWeakPersistentHandle(
+             reinterpret_cast<Dart_WeakPersistentHandle>(handle)) ||
+         Dart::IsReadOnlyApiHandle(handle) ||
+         Dart::IsReadOnlyHandle(reinterpret_cast<uword>(handle));
+}
+
+
 ApiLocalScope* Api::TopScope(Thread* thread) {
   ASSERT(thread != NULL);
   ApiLocalScope* scope = thread->api_top_scope();
@@ -1172,12 +1188,11 @@
         "Invalid Dart_InitializeParams version.");
   }
 
-  return Dart::InitOnce(params->vm_isolate_snapshot,
-                        params->instructions_snapshot, params->data_snapshot,
-                        params->create, params->shutdown, params->thread_exit,
-                        params->file_open, params->file_read,
-                        params->file_write, params->file_close,
-                        params->entropy_source, params->get_service_assets);
+  return Dart::InitOnce(
+      params->vm_snapshot_data, params->vm_snapshot_instructions,
+      params->create, params->shutdown, params->thread_exit, params->file_open,
+      params->file_read, params->file_write, params->file_close,
+      params->entropy_source, params->get_service_assets);
 }
 
 
@@ -1240,7 +1255,8 @@
 
 static Dart_Isolate CreateIsolate(const char* script_uri,
                                   const char* main,
-                                  const uint8_t* snapshot_buffer,
+                                  const uint8_t* snapshot_data,
+                                  const uint8_t* snapshot_instructions,
                                   intptr_t snapshot_length,
                                   kernel::Program* kernel_program,
                                   Dart_IsolateFlags* flags,
@@ -1269,9 +1285,10 @@
     // bootstrap library files which call out to a tag handler that may create
     // Api Handles when an error is encountered.
     Dart_EnterScope();
-    const Error& error_obj = Error::Handle(
-        Z, Dart::InitializeIsolate(snapshot_buffer, snapshot_length,
-                                   kernel_program, callback_data));
+    const Error& error_obj =
+        Error::Handle(Z, Dart::InitializeIsolate(
+                             snapshot_data, snapshot_instructions,
+                             snapshot_length, kernel_program, callback_data));
     if (error_obj.IsNull()) {
 #if defined(DART_NO_SNAPSHOT) && !defined(PRODUCT)
       if (FLAG_check_function_fingerprints && kernel_program == NULL) {
@@ -1297,14 +1314,16 @@
 }
 
 
-DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
-                                            const char* main,
-                                            const uint8_t* snapshot_buffer,
-                                            Dart_IsolateFlags* flags,
-                                            void* callback_data,
-                                            char** error) {
-  return CreateIsolate(script_uri, main, snapshot_buffer, -1, NULL, flags,
-                       callback_data, error);
+DART_EXPORT Dart_Isolate
+Dart_CreateIsolate(const char* script_uri,
+                   const char* main,
+                   const uint8_t* snapshot_data,
+                   const uint8_t* snapshot_instructions,
+                   Dart_IsolateFlags* flags,
+                   void* callback_data,
+                   char** error) {
+  return CreateIsolate(script_uri, main, snapshot_data, snapshot_instructions,
+                       -1, NULL, flags, callback_data, error);
 }
 
 
@@ -1314,7 +1333,7 @@
                                                       Dart_IsolateFlags* flags,
                                                       void* callback_data,
                                                       char** error) {
-  return CreateIsolate(script_uri, main, NULL, -1,
+  return CreateIsolate(script_uri, main, NULL, NULL, -1,
                        reinterpret_cast<kernel::Program*>(kernel_program),
                        flags, callback_data, error);
 }
@@ -1544,10 +1563,10 @@
 
 
 DART_EXPORT Dart_Handle
-Dart_CreateSnapshot(uint8_t** vm_isolate_snapshot_buffer,
-                    intptr_t* vm_isolate_snapshot_size,
-                    uint8_t** isolate_snapshot_buffer,
-                    intptr_t* isolate_snapshot_size) {
+Dart_CreateSnapshot(uint8_t** vm_snapshot_data_buffer,
+                    intptr_t* vm_snapshot_data_size,
+                    uint8_t** isolate_snapshot_data_buffer,
+                    intptr_t* isolate_snapshot_data_size) {
   DARTSCOPE(Thread::Current());
   API_TIMELINE_DURATION;
   Isolate* I = T->isolate();
@@ -1555,14 +1574,14 @@
     return Api::NewError(
         "Creating full snapshots requires --load_deferred_eagerly");
   }
-  if (vm_isolate_snapshot_buffer != NULL && vm_isolate_snapshot_size == NULL) {
-    RETURN_NULL_ERROR(vm_isolate_snapshot_size);
+  if (vm_snapshot_data_buffer != NULL && vm_snapshot_data_size == NULL) {
+    RETURN_NULL_ERROR(vm_snapshot_data_size);
   }
-  if (isolate_snapshot_buffer == NULL) {
-    RETURN_NULL_ERROR(isolate_snapshot_buffer);
+  if (isolate_snapshot_data_buffer == NULL) {
+    RETURN_NULL_ERROR(isolate_snapshot_data_buffer);
   }
-  if (isolate_snapshot_size == NULL) {
-    RETURN_NULL_ERROR(isolate_snapshot_size);
+  if (isolate_snapshot_data_size == NULL) {
+    RETURN_NULL_ERROR(isolate_snapshot_data_size);
   }
   // Finalize all classes if needed.
   Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
@@ -1577,28 +1596,32 @@
   I->heap()->IterateObjects(&check_canonical);
 #endif  // #if defined(DEBUG)
 
-  FullSnapshotWriter writer(Snapshot::kCore, vm_isolate_snapshot_buffer,
-                            isolate_snapshot_buffer, ApiReallocate,
-                            NULL /* instructions_writer */);
+  Symbols::Compact(I);
+
+  FullSnapshotWriter writer(Snapshot::kCore, vm_snapshot_data_buffer,
+                            isolate_snapshot_data_buffer, ApiReallocate,
+                            NULL /* vm_image_writer */,
+                            NULL /* isolate_image_writer */);
   writer.WriteFullSnapshot();
-  if (vm_isolate_snapshot_buffer != NULL) {
-    *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
+  if (vm_snapshot_data_buffer != NULL) {
+    *vm_snapshot_data_size = writer.VmIsolateSnapshotSize();
   }
-  *isolate_snapshot_size = writer.IsolateSnapshotSize();
+  *isolate_snapshot_data_size = writer.IsolateSnapshotSize();
   return Api::Success();
 }
 
 
-DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
-                                                  intptr_t* size) {
+DART_EXPORT Dart_Handle
+Dart_CreateScriptSnapshot(uint8_t** script_snapshot_buffer,
+                          intptr_t* script_snapshot_size) {
   API_TIMELINE_DURATION;
   DARTSCOPE(Thread::Current());
   Isolate* I = T->isolate();
-  if (buffer == NULL) {
-    RETURN_NULL_ERROR(buffer);
+  if (script_snapshot_buffer == NULL) {
+    RETURN_NULL_ERROR(script_snapshot_buffer);
   }
-  if (size == NULL) {
-    RETURN_NULL_ERROR(size);
+  if (script_snapshot_size == NULL) {
+    RETURN_NULL_ERROR(script_snapshot_size);
   }
   // Finalize all classes if needed.
   Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
@@ -1613,9 +1636,9 @@
   I->heap()->IterateObjects(&check_canonical);
 #endif  // #if defined(DEBUG)
 
-  ScriptSnapshotWriter writer(buffer, ApiReallocate);
+  ScriptSnapshotWriter writer(script_snapshot_buffer, ApiReallocate);
   writer.WriteScriptSnapshot(lib);
-  *size = writer.BytesWritten();
+  *script_snapshot_size = writer.BytesWritten();
   return Api::Success();
 }
 
@@ -3866,7 +3889,8 @@
   }
   if (constructor.IsGenerativeConstructor()) {
 #if defined(DEBUG)
-    if (!cls.is_allocated() && (Dart::snapshot_kind() == Snapshot::kAppAOT)) {
+    if (!cls.is_allocated() &&
+        (Dart::vm_snapshot_kind() == Snapshot::kAppAOT)) {
       return Api::NewError("Precompilation dropped '%s'", cls.ToCString());
     }
 #endif
@@ -3961,7 +3985,7 @@
   }
   const Class& cls = Class::Handle(Z, type_obj.type_class());
 #if defined(DEBUG)
-  if (!cls.is_allocated() && (Dart::snapshot_kind() == Snapshot::kAppAOT)) {
+  if (!cls.is_allocated() && (Dart::vm_snapshot_kind() == Snapshot::kAppAOT)) {
     return Api::NewError("Precompilation dropped '%s'", cls.ToCString());
   }
 #endif
@@ -3991,7 +4015,7 @@
   }
   const Class& cls = Class::Handle(Z, type_obj.type_class());
 #if defined(DEBUG)
-  if (!cls.is_allocated() && (Dart::snapshot_kind() == Snapshot::kAppAOT)) {
+  if (!cls.is_allocated() && (Dart::vm_snapshot_kind() == Snapshot::kAppAOT)) {
     return Api::NewError("Precompilation dropped '%s'", cls.ToCString());
   }
 #endif
@@ -4397,7 +4421,7 @@
           String::Handle(Z, Field::GetterName(field_name));
       getter = lib.LookupFunctionAllowPrivate(getter_name);
     } else if (!field.IsNull() && field.IsUninitialized()) {
-      // A field was found.  Check for a getter in the field's owner classs.
+      // A field was found.  Check for a getter in the field's owner class.
       const Class& cls = Class::Handle(Z, field.Owner());
       const String& getter_name =
           String::Handle(Z, Field::GetterName(field_name));
@@ -6634,16 +6658,16 @@
 
   NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(),
                                             "WriteAppAOTSnapshot"));
-  AssemblyInstructionsWriter instructions_writer(assembly_buffer, ApiReallocate,
-                                                 2 * MB /* initial_size */);
-  uint8_t* vm_isolate_snapshot_buffer = NULL;
-  uint8_t* isolate_snapshot_buffer = NULL;
-  FullSnapshotWriter writer(Snapshot::kAppAOT, &vm_isolate_snapshot_buffer,
-                            &isolate_snapshot_buffer, ApiReallocate,
-                            &instructions_writer);
+  AssemblyImageWriter image_writer(assembly_buffer, ApiReallocate,
+                                   2 * MB /* initial_size */);
+  uint8_t* vm_snapshot_data_buffer = NULL;
+  uint8_t* isolate_snapshot_data_buffer = NULL;
+  FullSnapshotWriter writer(Snapshot::kAppAOT, &vm_snapshot_data_buffer,
+                            &isolate_snapshot_data_buffer, ApiReallocate,
+                            &image_writer, &image_writer);
 
   writer.WriteFullSnapshot();
-  *assembly_size = instructions_writer.AssemblySize();
+  *assembly_size = image_writer.AssemblySize();
 
   return Api::Success();
 #endif
@@ -6651,14 +6675,14 @@
 
 
 DART_EXPORT Dart_Handle
-Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_isolate_snapshot_buffer,
-                                 intptr_t* vm_isolate_snapshot_size,
-                                 uint8_t** isolate_snapshot_buffer,
-                                 intptr_t* isolate_snapshot_size,
-                                 uint8_t** instructions_blob_buffer,
-                                 intptr_t* instructions_blob_size,
-                                 uint8_t** rodata_blob_buffer,
-                                 intptr_t* rodata_blob_size) {
+Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_snapshot_data_buffer,
+                                 intptr_t* vm_snapshot_data_size,
+                                 uint8_t** vm_snapshot_instructions_buffer,
+                                 intptr_t* vm_snapshot_instructions_size,
+                                 uint8_t** isolate_snapshot_data_buffer,
+                                 intptr_t* isolate_snapshot_data_size,
+                                 uint8_t** isolate_snapshot_instructions_buffer,
+                                 intptr_t* isolate_snapshot_instructions_size) {
 #if defined(TARGET_ARCH_IA32)
   return Api::NewError("AOT compilation is not supported on IA32.");
 #elif defined(TARGET_ARCH_DBC)
@@ -6676,45 +6700,48 @@
         "Did you forget to call Dart_Precompile?");
   }
   ASSERT(FLAG_load_deferred_eagerly);
-  if (vm_isolate_snapshot_buffer == NULL) {
-    RETURN_NULL_ERROR(vm_isolate_snapshot_buffer);
+  if (vm_snapshot_data_buffer == NULL) {
+    RETURN_NULL_ERROR(vm_snapshot_data_buffer);
   }
-  if (vm_isolate_snapshot_size == NULL) {
-    RETURN_NULL_ERROR(vm_isolate_snapshot_size);
+  if (vm_snapshot_data_size == NULL) {
+    RETURN_NULL_ERROR(vm_snapshot_data_size);
   }
-  if (isolate_snapshot_buffer == NULL) {
-    RETURN_NULL_ERROR(isolate_snapshot_buffer);
+  if (vm_snapshot_instructions_buffer == NULL) {
+    RETURN_NULL_ERROR(vm_snapshot_instructions_buffer);
   }
-  if (isolate_snapshot_size == NULL) {
-    RETURN_NULL_ERROR(isolate_snapshot_size);
+  if (vm_snapshot_instructions_size == NULL) {
+    RETURN_NULL_ERROR(vm_snapshot_instructions_size);
   }
-  if (instructions_blob_buffer == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_buffer);
+  if (isolate_snapshot_data_buffer == NULL) {
+    RETURN_NULL_ERROR(isolate_snapshot_data_buffer);
   }
-  if (instructions_blob_size == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_size);
+  if (isolate_snapshot_data_size == NULL) {
+    RETURN_NULL_ERROR(isolate_snapshot_data_size);
   }
-  if (rodata_blob_buffer == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_buffer);
+  if (isolate_snapshot_instructions_buffer == NULL) {
+    RETURN_NULL_ERROR(instructions_snapshot_blob_buffer);
   }
-  if (rodata_blob_size == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_size);
+  if (isolate_snapshot_instructions_buffer == NULL) {
+    RETURN_NULL_ERROR(instructions_snapshot_blob_size);
   }
 
   NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(),
                                             "WriteAppAOTSnapshot"));
-  BlobInstructionsWriter instructions_writer(instructions_blob_buffer,
-                                             rodata_blob_buffer, ApiReallocate,
-                                             2 * MB /* initial_size */);
-  FullSnapshotWriter writer(Snapshot::kAppAOT, vm_isolate_snapshot_buffer,
-                            isolate_snapshot_buffer, ApiReallocate,
-                            &instructions_writer);
+  BlobImageWriter vm_image_writer(vm_snapshot_instructions_buffer,
+                                  ApiReallocate, 2 * MB /* initial_size */);
+  BlobImageWriter isolate_image_writer(isolate_snapshot_instructions_buffer,
+                                       ApiReallocate,
+                                       2 * MB /* initial_size */);
+  FullSnapshotWriter writer(Snapshot::kAppAOT, vm_snapshot_data_buffer,
+                            isolate_snapshot_data_buffer, ApiReallocate,
+                            &vm_image_writer, &isolate_image_writer);
 
   writer.WriteFullSnapshot();
-  *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
-  *isolate_snapshot_size = writer.IsolateSnapshotSize();
-  *instructions_blob_size = instructions_writer.InstructionsBlobSize();
-  *rodata_blob_size = instructions_writer.RodataBlobSize();
+  *vm_snapshot_data_size = writer.VmIsolateSnapshotSize();
+  *vm_snapshot_instructions_size = vm_image_writer.InstructionsBlobSize();
+  *isolate_snapshot_data_size = writer.IsolateSnapshotSize();
+  *isolate_snapshot_instructions_size =
+      isolate_image_writer.InstructionsBlobSize();
 
   return Api::Success();
 #endif
@@ -6722,12 +6749,10 @@
 
 
 DART_EXPORT Dart_Handle
-Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_buffer,
-                                 intptr_t* isolate_snapshot_size,
-                                 uint8_t** instructions_blob_buffer,
-                                 intptr_t* instructions_blob_size,
-                                 uint8_t** rodata_blob_buffer,
-                                 intptr_t* rodata_blob_size) {
+Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer,
+                                 intptr_t* isolate_snapshot_data_size,
+                                 uint8_t** isolate_snapshot_instructions_buffer,
+                                 intptr_t* isolate_snapshot_instructions_size) {
 #if defined(TARGET_ARCH_IA32)
   return Api::NewError("Snapshots with code are not supported on IA32.");
 #elif defined(TARGET_ARCH_DBC)
@@ -6742,23 +6767,17 @@
     return Api::NewError(
         "Creating full snapshots requires --load_deferred_eagerly");
   }
-  if (isolate_snapshot_buffer == NULL) {
-    RETURN_NULL_ERROR(isolate_snapshot_buffer);
+  if (isolate_snapshot_data_buffer == NULL) {
+    RETURN_NULL_ERROR(isolate_snapshot_data_buffer);
   }
-  if (isolate_snapshot_size == NULL) {
-    RETURN_NULL_ERROR(isolate_snapshot_size);
+  if (isolate_snapshot_data_size == NULL) {
+    RETURN_NULL_ERROR(isolate_snapshot_data_size);
   }
-  if (instructions_blob_buffer == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_buffer);
+  if (isolate_snapshot_instructions_buffer == NULL) {
+    RETURN_NULL_ERROR(instructions_snapshot_blob_buffer);
   }
-  if (instructions_blob_size == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_size);
-  }
-  if (rodata_blob_buffer == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_buffer);
-  }
-  if (rodata_blob_size == NULL) {
-    RETURN_NULL_ERROR(instructions_blob_size);
+  if (isolate_snapshot_instructions_buffer == NULL) {
+    RETURN_NULL_ERROR(instructions_snapshot_blob_size);
   }
   // Finalize all classes if needed.
   Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
@@ -6767,17 +6786,21 @@
   }
   I->StopBackgroundCompiler();
 
+  Symbols::Compact(I);
+
   NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(),
                                             "WriteAppJITSnapshot"));
-  BlobInstructionsWriter instructions_writer(instructions_blob_buffer,
-                                             rodata_blob_buffer, ApiReallocate,
-                                             2 * MB /* initial_size */);
-  FullSnapshotWriter writer(Snapshot::kAppJIT, NULL, isolate_snapshot_buffer,
-                            ApiReallocate, &instructions_writer);
+  BlobImageWriter isolate_image_writer(isolate_snapshot_instructions_buffer,
+                                       ApiReallocate,
+                                       2 * MB /* initial_size */);
+  FullSnapshotWriter writer(Snapshot::kAppJIT, NULL,
+                            isolate_snapshot_data_buffer, ApiReallocate, NULL,
+                            &isolate_image_writer);
   writer.WriteFullSnapshot();
-  *isolate_snapshot_size = writer.IsolateSnapshotSize();
-  *instructions_blob_size = instructions_writer.InstructionsBlobSize();
-  *rodata_blob_size = instructions_writer.RodataBlobSize();
+
+  *isolate_snapshot_data_size = writer.IsolateSnapshotSize();
+  *isolate_snapshot_instructions_size =
+      isolate_image_writer.InstructionsBlobSize();
 
   return Api::Success();
 #endif
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index f597ca2..d61a3f8 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -9,6 +9,7 @@
 #include "vm/native_arguments.h"
 #include "vm/object.h"
 #include "vm/safepoint.h"
+#include "vm/thread_registry.h"
 
 namespace dart {
 
@@ -18,6 +19,7 @@
 class LocalHandle;
 class PersistentHandle;
 class ReusableObjectHandleScope;
+class ThreadRegistry;
 
 const char* CanonicalFunction(const char* func);
 
@@ -166,6 +168,9 @@
     return (ClassId(handle) >= kInstanceCid);
   }
 
+  // Returns true if the handle is non-dangling.
+  static bool IsValid(Dart_Handle handle);
+
   // Returns true if the handle holds an Error.
   static bool IsError(Dart_Handle handle) {
     return RawObject::IsErrorClassId(ClassId(handle));
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 037fb4b..eb84645 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -3497,7 +3497,8 @@
   intptr_t mydata = 12345;
   char* err;
   Dart_Isolate isolate =
-      Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL,
+      Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                         bin::core_isolate_snapshot_instructions, NULL,
                          reinterpret_cast<void*>(mydata), &err);
   EXPECT(isolate != NULL);
   EXPECT_EQ(mydata, reinterpret_cast<intptr_t>(Dart_CurrentIsolateData()));
@@ -3528,7 +3529,8 @@
 
   char* err;
   Dart_Isolate isolate = Dart_CreateIsolate(
-      NULL, NULL, bin::core_isolate_snapshot_buffer, &api_flags, NULL, &err);
+      NULL, NULL, bin::core_isolate_snapshot_data,
+      bin::core_isolate_snapshot_instructions, &api_flags, NULL, &err);
   if (isolate == NULL) {
     OS::Print("Creation of isolate failed '%s'\n", err);
     free(err);
@@ -7573,7 +7575,8 @@
     MonitorLocker ml(sync);
     char* error = NULL;
     shared_isolate = Dart_CreateIsolate(
-        NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL, &error);
+        NULL, NULL, bin::core_isolate_snapshot_data,
+        bin::core_isolate_snapshot_instructions, NULL, NULL, &error);
     EXPECT(shared_isolate != NULL);
     Dart_EnterScope();
     Dart_Handle url = NewString(TestCase::url());
@@ -7624,7 +7627,8 @@
   // Create an isolate.
   char* err;
   Dart_Isolate isolate = Dart_CreateIsolate(
-      NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, my_data, &err);
+      NULL, NULL, bin::core_isolate_snapshot_data,
+      bin::core_isolate_snapshot_instructions, NULL, my_data, &err);
   if (isolate == NULL) {
     OS::Print("Creation of isolate failed '%s'\n", err);
     free(err);
@@ -7673,7 +7677,8 @@
   // Create an isolate.
   char* err;
   Dart_Isolate isolate = Dart_CreateIsolate(
-      NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL, &err);
+      NULL, NULL, bin::core_isolate_snapshot_data,
+      bin::core_isolate_snapshot_instructions, NULL, NULL, &err);
   if (isolate == NULL) {
     OS::Print("Creation of isolate failed '%s'\n", err);
     free(err);
diff --git a/runtime/vm/dart_api_state.cc b/runtime/vm/dart_api_state.cc
index 2d1d827..d5d0d3b 100644
--- a/runtime/vm/dart_api_state.cc
+++ b/runtime/vm/dart_api_state.cc
@@ -14,6 +14,8 @@
 
 namespace dart {
 
+intptr_t ApiNativeScope::current_memory_usage_ = 0;
+
 BackgroundFinalizer::BackgroundFinalizer(Isolate* isolate,
                                          FinalizationQueue* queue)
     : isolate_(isolate), queue_(queue) {
diff --git a/runtime/vm/dart_api_state.h b/runtime/vm/dart_api_state.h
index 1bff38c..7946ef8 100644
--- a/runtime/vm/dart_api_state.h
+++ b/runtime/vm/dart_api_state.h
@@ -512,6 +512,17 @@
     return IsValidScopedHandle(reinterpret_cast<uword>(object));
   }
 
+  bool IsFreeHandle(Dart_PersistentHandle object) const {
+    PersistentHandle* handle = free_list_;
+    while (handle != NULL) {
+      if (handle == reinterpret_cast<PersistentHandle*>(object)) {
+        return true;
+      }
+      handle = handle->Next();
+    }
+    return false;
+  }
+
   // Returns a count of active handles (used for testing purposes).
   int CountHandles() const { return CountScopedHandles(); }
 
@@ -594,6 +605,18 @@
     return IsValidScopedHandle(reinterpret_cast<uword>(object));
   }
 
+  bool IsFreeHandle(Dart_WeakPersistentHandle object) const {
+    MutexLocker ml(mutex_);
+    FinalizablePersistentHandle* handle = free_list_;
+    while (handle != NULL) {
+      if (handle == reinterpret_cast<FinalizablePersistentHandle*>(object)) {
+        return true;
+      }
+      handle = handle->Next();
+    }
+    return false;
+  }
+
   // Returns a count of active handles (used for testing purposes).
   int CountHandles() const { return CountScopedHandles(); }
 
@@ -651,11 +674,18 @@
     ASSERT(Current() == NULL);
     OSThread::SetThreadLocal(Api::api_native_key_,
                              reinterpret_cast<uword>(this));
+    // We manually increment the memory usage counter since there is memory
+    // initially allocated within the zone on creation.
+    IncrementNativeScopeMemoryUsage(zone_.GetZone()->CapacityInBytes());
   }
 
   ~ApiNativeScope() {
     ASSERT(Current() == this);
     OSThread::SetThreadLocal(Api::api_native_key_, 0);
+    // We must also manually decrement the memory usage counter since the native
+    // is still holding it's initial memory and ~Zone() won't be able to
+    // determine which memory usage counter to decrement.
+    DecrementNativeScopeMemoryUsage(zone_.GetZone()->CapacityInBytes());
   }
 
   static inline ApiNativeScope* Current() {
@@ -663,6 +693,16 @@
         OSThread::GetThreadLocal(Api::api_native_key_));
   }
 
+  static intptr_t current_memory_usage() { return current_memory_usage_; }
+
+  static void IncrementNativeScopeMemoryUsage(intptr_t size) {
+    AtomicOperations::IncrementBy(&current_memory_usage_, size);
+  }
+
+  static void DecrementNativeScopeMemoryUsage(intptr_t size) {
+    AtomicOperations::DecrementBy(&current_memory_usage_, size);
+  }
+
   Zone* zone() {
     Zone* result = zone_.GetZone();
     ASSERT(result->handles()->CountScopedHandles() == 0);
@@ -671,6 +711,9 @@
   }
 
  private:
+  // The current total memory usage within ApiNativeScopes.
+  static intptr_t current_memory_usage_;
+
   ApiZone zone_;
 };
 
@@ -742,10 +785,27 @@
     return persistent_handles_.IsValidHandle(object);
   }
 
+  bool IsFreePersistentHandle(Dart_PersistentHandle object) const {
+    return persistent_handles_.IsFreeHandle(object);
+  }
+
+  bool IsActivePersistentHandle(Dart_PersistentHandle object) const {
+    return IsValidPersistentHandle(object) && !IsFreePersistentHandle(object);
+  }
+
   bool IsValidWeakPersistentHandle(Dart_WeakPersistentHandle object) const {
     return weak_persistent_handles_.IsValidHandle(object);
   }
 
+  bool IsFreeWeakPersistentHandle(Dart_WeakPersistentHandle object) const {
+    return weak_persistent_handles_.IsFreeHandle(object);
+  }
+
+  bool IsActiveWeakPersistentHandle(Dart_WeakPersistentHandle object) const {
+    return IsValidWeakPersistentHandle(object) &&
+           !IsFreeWeakPersistentHandle(object);
+  }
+
   bool IsProtectedHandle(PersistentHandle* object) const {
     if (object == NULL) return false;
     return object == null_ || object == true_ || object == false_;
diff --git a/runtime/vm/datastream.h b/runtime/vm/datastream.h
index b50f585..19a33c4 100644
--- a/runtime/vm/datastream.h
+++ b/runtime/vm/datastream.h
@@ -310,10 +310,17 @@
   }
 
   uint8_t* buffer() const { return *buffer_; }
+  void set_buffer(uint8_t* value) { *buffer_ = value; }
   intptr_t bytes_written() const { return current_ - *buffer_; }
 
   void set_current(uint8_t* value) { current_ = value; }
 
+  void Align(intptr_t alignment) {
+    intptr_t position = current_ - *buffer_;
+    position = Utils::RoundUp(position, alignment);
+    current_ = *buffer_ + position;
+  }
+
   template <int N, typename T>
   class Raw {};
 
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 53bcba2..3dce573 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -638,7 +638,7 @@
       const int8_t kind = var_info.kind();
       if ((kind == RawLocalVarDescriptors::kContextLevel) &&
           (var_info.begin_pos <= activation_token_pos) &&
-          (activation_token_pos < var_info.end_pos)) {
+          (activation_token_pos <= var_info.end_pos)) {
         // This var_descriptors_ entry is a context scope which is in scope
         // of the current token position. Now check whether it is shadowing
         // the previous context scope.
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index af82d62..bd6f464 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -103,7 +103,6 @@
     "Maximum number of polymorphic check, otherwise it is megamorphic.")       \
   P(max_equality_polymorphic_checks, int, 32,                                  \
     "Maximum number of polymorphic checks in equality operator,")              \
-  P(merge_sin_cos, bool, false, "Merge sin/cos into sincos")                   \
   P(new_gen_ext_limit, int, 64,                                                \
     "maximum total external size (MB) in new gen before triggering GC")        \
   P(new_gen_semi_max_size, int, (kWordSize <= 4) ? 16 : 32,                    \
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 4eb78fa..16ed1eb 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -2052,7 +2052,6 @@
       }
     }
     TryMergeTruncDivMod(&div_mod_merge);
-    TryMergeMathUnary(&sin_cos_merge);
   }
 }
 
@@ -2225,63 +2224,6 @@
 }
 
 
-// Tries to merge MathUnary operations, in this case sine and cosine.
-void FlowGraph::TryMergeMathUnary(
-    GrowableArray<InvokeMathCFunctionInstr*>* merge_candidates) {
-  if (!FlowGraphCompiler::SupportsSinCos() || !CanUnboxDouble() ||
-      !FLAG_merge_sin_cos) {
-    return;
-  }
-  if (merge_candidates->length() < 2) {
-    // Need at least a SIN and a COS.
-    return;
-  }
-  for (intptr_t i = 0; i < merge_candidates->length(); i++) {
-    InvokeMathCFunctionInstr* curr_instr = (*merge_candidates)[i];
-    if (curr_instr == NULL) {
-      // Instruction was merged already.
-      continue;
-    }
-    const MethodRecognizer::Kind kind = curr_instr->recognized_kind();
-    ASSERT((kind == MethodRecognizer::kMathSin) ||
-           (kind == MethodRecognizer::kMathCos));
-    // Check if there is sin/cos binop with same inputs.
-    const MethodRecognizer::Kind other_kind =
-        (kind == MethodRecognizer::kMathSin) ? MethodRecognizer::kMathCos
-                                             : MethodRecognizer::kMathSin;
-    Definition* def = curr_instr->InputAt(0)->definition();
-    for (intptr_t k = i + 1; k < merge_candidates->length(); k++) {
-      InvokeMathCFunctionInstr* other_op = (*merge_candidates)[k];
-      // 'other_op' can be NULL if it was already merged.
-      if ((other_op != NULL) && (other_op->recognized_kind() == other_kind) &&
-          (other_op->InputAt(0)->definition() == def)) {
-        (*merge_candidates)[k] = NULL;  // Clear it.
-        ASSERT(curr_instr->HasUses());
-        AppendExtractNthOutputForMerged(curr_instr,
-                                        MergedMathInstr::OutputIndexOf(kind),
-                                        kUnboxedDouble, kDoubleCid);
-        ASSERT(other_op->HasUses());
-        AppendExtractNthOutputForMerged(
-            other_op, MergedMathInstr::OutputIndexOf(other_kind),
-            kUnboxedDouble, kDoubleCid);
-        ZoneGrowableArray<Value*>* args = new (Z) ZoneGrowableArray<Value*>(1);
-        args->Add(new (Z) Value(curr_instr->InputAt(0)->definition()));
-        // Replace with SinCos.
-        MergedMathInstr* sin_cos = new (Z) MergedMathInstr(
-            args, curr_instr->DeoptimizationTarget(), MergedMathInstr::kSinCos);
-        curr_instr->ReplaceWith(sin_cos, NULL);
-        other_op->ReplaceUsesWith(sin_cos);
-        other_op->RemoveFromGraph();
-        // Only one merge possible. Because canonicalization happens later,
-        // more candidates are possible.
-        // TODO(srdjan): Allow merging of sin/cos into sincos.
-        break;
-      }
-    }
-  }
-}
-
-
 void FlowGraph::AppendExtractNthOutputForMerged(Definition* instr,
                                                 intptr_t index,
                                                 Representation rep,
diff --git a/runtime/vm/flow_graph.h b/runtime/vm/flow_graph.h
index 544dfac..9c1c08e 100644
--- a/runtime/vm/flow_graph.h
+++ b/runtime/vm/flow_graph.h
@@ -351,8 +351,6 @@
       Definition* right_instr);
 
   void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates);
-  void TryMergeMathUnary(
-      GrowableArray<InvokeMathCFunctionInstr*>* merge_candidates);
 
   void AppendExtractNthOutputForMerged(Definition* instr,
                                        intptr_t ix,
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index 9010074..4bc071c 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -32,7 +32,7 @@
 static const intptr_t kPairVirtualRegisterOffset = 1;
 
 // Definitions which have pair representations
-// (kPairOfTagged or kPairOfUnboxedDouble) use two virtual register names.
+// (kPairOfTagged) use two virtual register names.
 // At SSA index allocation time each definition reserves two SSA indexes,
 // the second index is only used for pairs. This function maps from the first
 // SSA index to the second.
@@ -786,8 +786,7 @@
   const Representation rep = instr->representation();
 #if !defined(TARGET_ARCH_DBC)
   if ((rep == kUnboxedDouble) || (rep == kUnboxedFloat32x4) ||
-      (rep == kUnboxedInt32x4) || (rep == kUnboxedFloat64x2) ||
-      (rep == kPairOfUnboxedDouble)) {
+      (rep == kUnboxedInt32x4) || (rep == kUnboxedFloat64x2)) {
     return Location::kFpuRegister;
   } else {
     return Location::kRegister;
@@ -796,7 +795,7 @@
   // DBC supports only unboxed doubles and does not have distinguished FPU
   // registers.
   ASSERT((rep != kUnboxedFloat32x4) && (rep != kUnboxedInt32x4) &&
-         (rep != kUnboxedFloat64x2) && (rep != kPairOfUnboxedDouble));
+         (rep != kUnboxedFloat64x2));
   return Location::kRegister;
 #endif
 }
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index bf13562..1bafaa5 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2104,6 +2104,11 @@
 
 
 void EffectGraphVisitor::VisitJumpNode(JumpNode* node) {
+  if (FLAG_support_debugger && owner()->function().is_debuggable()) {
+    AddInstruction(new (Z) DebugStepCheckInstr(node->token_pos(),
+                                               RawPcDescriptors::kRuntimeCall));
+  }
+
   NestedContextAdjustment context_adjustment(owner(), owner()->context_level());
 
   for (intptr_t i = 0; i < node->inlined_finally_list_length(); i++) {
@@ -3364,7 +3369,7 @@
     if (rhs->IsAssignableNode()) {
       rhs = rhs->AsAssignableNode()->expr();
     }
-    if ((rhs->IsLiteralNode() ||
+    if ((rhs->IsLiteralNode() || rhs->IsLoadStaticFieldNode() ||
          (rhs->IsLoadLocalNode() &&
           !rhs->AsLoadLocalNode()->local().IsInternal()) ||
          rhs->IsClosureNode()) &&
@@ -3476,7 +3481,7 @@
       rhs = rhs->AsAssignableNode()->expr();
     }
     if ((rhs->IsLiteralNode() || rhs->IsLoadLocalNode() ||
-         rhs->IsClosureNode()) &&
+         rhs->IsLoadStaticFieldNode() || rhs->IsClosureNode()) &&
         node->token_pos().IsDebugPause()) {
       AddInstruction(new (Z) DebugStepCheckInstr(
           node->token_pos(), RawPcDescriptors::kRuntimeCall));
@@ -4207,6 +4212,7 @@
   if (FLAG_support_debugger) {
     if (node->exception()->IsLiteralNode() ||
         node->exception()->IsLoadLocalNode() ||
+        node->exception()->IsLoadStaticFieldNode() ||
         node->exception()->IsClosureNode()) {
       AddInstruction(new (Z) DebugStepCheckInstr(
           node->token_pos(), RawPcDescriptors::kRuntimeCall));
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h
index 8d8606b..9e5b784 100644
--- a/runtime/vm/flow_graph_compiler.h
+++ b/runtime/vm/flow_graph_compiler.h
@@ -292,7 +292,6 @@
 
   static bool SupportsUnboxedDoubles();
   static bool SupportsUnboxedMints();
-  static bool SupportsSinCos();
   static bool SupportsUnboxedSimd128();
   static bool SupportsHardwareDivision();
   static bool CanConvertUnboxedMintToDouble();
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index 3a565ea..e16256c 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -53,11 +53,6 @@
 }
 
 
-bool FlowGraphCompiler::SupportsSinCos() {
-  return false;
-}
-
-
 bool FlowGraphCompiler::SupportsHardwareDivision() {
   return TargetCPUFeatures::can_divide();
 }
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index 27430d6..8534b1f 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -51,11 +51,6 @@
 }
 
 
-bool FlowGraphCompiler::SupportsSinCos() {
-  return false;
-}
-
-
 bool FlowGraphCompiler::CanConvertUnboxedMintToDouble() {
   // ARM does not have a short instruction sequence for converting int64 to
   // double.
diff --git a/runtime/vm/flow_graph_compiler_dbc.cc b/runtime/vm/flow_graph_compiler_dbc.cc
index eb3660a..52e3af3 100644
--- a/runtime/vm/flow_graph_compiler_dbc.cc
+++ b/runtime/vm/flow_graph_compiler_dbc.cc
@@ -58,11 +58,6 @@
 }
 
 
-bool FlowGraphCompiler::SupportsSinCos() {
-  return false;
-}
-
-
 bool FlowGraphCompiler::SupportsHardwareDivision() {
   return true;
 }
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index d679be9..e0d5846 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -56,11 +56,6 @@
 }
 
 
-bool FlowGraphCompiler::SupportsSinCos() {
-  return true;
-}
-
-
 bool FlowGraphCompiler::SupportsHardwareDivision() {
   return true;
 }
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index 5bb23c1..b6914ad 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -49,11 +49,6 @@
 }
 
 
-bool FlowGraphCompiler::SupportsSinCos() {
-  return false;
-}
-
-
 bool FlowGraphCompiler::SupportsHardwareDivision() {
   return true;
 }
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 01b4c08..fa35f47 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -52,11 +52,6 @@
 }
 
 
-bool FlowGraphCompiler::SupportsSinCos() {
-  return true;
-}
-
-
 bool FlowGraphCompiler::SupportsHardwareDivision() {
   return true;
 }
diff --git a/runtime/vm/gc_sweeper.cc b/runtime/vm/gc_sweeper.cc
index f779b49..738e1b8 100644
--- a/runtime/vm/gc_sweeper.cc
+++ b/runtime/vm/gc_sweeper.cc
@@ -16,6 +16,11 @@
 namespace dart {
 
 bool GCSweeper::SweepPage(HeapPage* page, FreeList* freelist, bool locked) {
+  if (page->is_image_page()) {
+    // Don't clear mark bits.
+    return true;
+  }
+
   // Keep track whether this page is still in use.
   bool in_use = false;
 
diff --git a/runtime/vm/handles_test.cc b/runtime/vm/handles_test.cc
index 8a05fb7..6c472b1 100644
--- a/runtime/vm/handles_test.cc
+++ b/runtime/vm/handles_test.cc
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "platform/assert.h"
+#include "vm/dart_api_state.h"
 #include "vm/flags.h"
 #include "vm/handles.h"
 #include "vm/heap.h"
@@ -77,4 +78,57 @@
   EXPECT_EQ(handle_count, VMHandles::ScopedHandleCount());
 }
 
+
+static void NoopCallback(void* isolate_callback_data,
+                         Dart_WeakPersistentHandle handle,
+                         void* peer) {}
+
+
+// Unit test for handle validity checks.
+TEST_CASE(CheckHandleValidity) {
+#if defined(DEBUG)
+  FLAG_trace_handles = true;
+#endif
+  Thread* current = Thread::Current();
+  Dart_Handle handle = NULL;
+  // Check validity using zone handles.
+  {
+    StackZone sz(current);
+    handle = reinterpret_cast<Dart_Handle>(&Smi::ZoneHandle(Smi::New(1)));
+    EXPECT_VALID(handle);
+  }
+  EXPECT(!Api::IsValid(handle));
+
+  // Check validity using scoped handles.
+  {
+    HANDLESCOPE(current);
+    Dart_EnterScope();
+    handle = reinterpret_cast<Dart_Handle>(&Smi::Handle(Smi::New(1)));
+    EXPECT_VALID(handle);
+    Dart_ExitScope();
+  }
+  EXPECT(!Api::IsValid(handle));
+
+  // Check validity using persistent handle.
+  Isolate* isolate = Isolate::Current();
+  Dart_PersistentHandle persistent_handle =
+      Dart_NewPersistentHandle(Api::NewHandle(thread, Smi::New(1)));
+  EXPECT_VALID(persistent_handle);
+
+  Dart_DeletePersistentHandle(persistent_handle);
+  EXPECT(!Api::IsValid(persistent_handle));
+
+  // Check validity using weak persistent handle.
+  handle = reinterpret_cast<Dart_Handle>(Dart_NewWeakPersistentHandle(
+      Dart_NewStringFromCString("foo"), NULL, 0, NoopCallback));
+
+  EXPECT_NOTNULL(handle);
+  EXPECT_VALID(handle);
+
+  Dart_DeleteWeakPersistentHandle(
+      reinterpret_cast<Dart_Isolate>(isolate),
+      reinterpret_cast<Dart_WeakPersistentHandle>(handle));
+  EXPECT(!Api::IsValid(handle));
+}
+
 }  // namespace dart
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index c7ce678..d8ce157 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -189,6 +189,17 @@
 }
 
 
+void Heap::VisitObjectsNoImagePages(ObjectVisitor* visitor) const {
+  new_space_.VisitObjects(visitor);
+  old_space_.VisitObjectsNoImagePages(visitor);
+}
+
+
+void Heap::VisitObjectsImagePages(ObjectVisitor* visitor) const {
+  old_space_.VisitObjectsImagePages(visitor);
+}
+
+
 HeapIterationScope::HeapIterationScope(bool writable)
     : StackResource(Thread::Current()),
       old_space_(isolate()->heap()->old_space()),
@@ -247,9 +258,9 @@
 }
 
 
-void Heap::IterateOldObjectsNoEmbedderPages(ObjectVisitor* visitor) const {
+void Heap::IterateOldObjectsNoImagePages(ObjectVisitor* visitor) const {
   HeapIterationScope heap_iteration_scope;
-  old_space_.VisitObjectsNoEmbedderPages(visitor);
+  old_space_.VisitObjectsNoImagePages(visitor);
 }
 
 
@@ -520,7 +531,12 @@
   {
     VerifyObjectVisitor object_visitor(isolate(), allocated_set,
                                        mark_expectation);
-    this->VisitObjects(&object_visitor);
+    this->VisitObjectsNoImagePages(&object_visitor);
+  }
+  {
+    VerifyObjectVisitor object_visitor(isolate(), allocated_set,
+                                       kRequireMarked);
+    this->VisitObjectsImagePages(&object_visitor);
   }
 
   Isolate* vm_isolate = Dart::vm_isolate();
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 40bbc90..80265fc 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -92,7 +92,7 @@
 
   void IterateObjects(ObjectVisitor* visitor) const;
   void IterateOldObjects(ObjectVisitor* visitor) const;
-  void IterateOldObjectsNoEmbedderPages(ObjectVisitor* visitor) const;
+  void IterateOldObjectsNoImagePages(ObjectVisitor* visitor) const;
   void IterateObjectPointers(ObjectVisitor* visitor) const;
 
   // Find an object by visiting all pointers in the specified heap space,
@@ -245,8 +245,8 @@
   Monitor* barrier() const { return barrier_; }
   Monitor* barrier_done() const { return barrier_done_; }
 
-  void SetupExternalPage(void* pointer, uword size, bool is_executable) {
-    old_space_.SetupExternalPage(pointer, size, is_executable);
+  void SetupImagePage(void* pointer, uword size, bool is_executable) {
+    old_space_.SetupImagePage(pointer, size, is_executable);
   }
 
  private:
@@ -296,6 +296,8 @@
   // Visit all objects, including FreeListElement "objects". Caller must ensure
   // concurrent sweeper is not running, and the visitor must not allocate.
   void VisitObjects(ObjectVisitor* visitor) const;
+  void VisitObjectsNoImagePages(ObjectVisitor* visitor) const;
+  void VisitObjectsImagePages(ObjectVisitor* visitor) const;
 
   // Like Verify, but does not wait for concurrent sweeper, so caller must
   // ensure thread-safety.
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index bfee006..66c8ea4 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -1096,8 +1096,6 @@
       return "float64x2";
     case kPairOfTagged:
       return "tagged-pair";
-    case kPairOfUnboxedDouble:
-      return "double-pair";
     case kNoRepresentation:
       return "none";
     case kNumRepresentations:
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 007cb36..9ca5040 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -3327,6 +3327,11 @@
 }
 
 
+void Environment::PushValue(Value* value) {
+  values_.Add(value);
+}
+
+
 Environment* Environment::DeepCopy(Zone* zone, intptr_t length) const {
   ASSERT(length <= values_.length());
   Environment* copy = new (zone)
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 82507f1..8359174 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -1624,11 +1624,9 @@
   void ClearSSATempIndex() { ssa_temp_index_ = -1; }
   bool HasPairRepresentation() const {
 #if defined(TARGET_ARCH_X64)
-    return (representation() == kPairOfTagged) ||
-           (representation() == kPairOfUnboxedDouble);
+    return representation() == kPairOfTagged;
 #else
     return (representation() == kPairOfTagged) ||
-           (representation() == kPairOfUnboxedDouble) ||
            (representation() == kUnboxedMint);
 #endif
   }
@@ -7392,8 +7390,6 @@
     ASSERT(idx == 0);
     if (representation() == kTagged) {
       return kPairOfTagged;
-    } else if (representation() == kUnboxedDouble) {
-      return kPairOfUnboxedDouble;
     }
     UNREACHABLE();
     return definition_rep_;
@@ -7419,7 +7415,6 @@
  public:
   enum Kind {
     kTruncDivMod,
-    kSinCos,
   };
 
   MergedMathInstr(ZoneGrowableArray<Value*>* inputs,
@@ -7429,8 +7424,6 @@
   static intptr_t InputCountFor(MergedMathInstr::Kind kind) {
     if (kind == kTruncDivMod) {
       return 2;
-    } else if (kind == kSinCos) {
-      return 1;
     } else {
       UNIMPLEMENTED();
       return -1;
@@ -7451,8 +7444,6 @@
   virtual bool CanDeoptimize() const {
     if (kind_ == kTruncDivMod) {
       return true;
-    } else if (kind_ == kSinCos) {
-      return false;
     } else {
       UNIMPLEMENTED();
       return false;
@@ -7462,8 +7453,6 @@
   virtual Representation representation() const {
     if (kind_ == kTruncDivMod) {
       return kPairOfTagged;
-    } else if (kind_ == kSinCos) {
-      return kPairOfUnboxedDouble;
     } else {
       UNIMPLEMENTED();
       return kTagged;
@@ -7474,8 +7463,6 @@
     ASSERT((0 <= idx) && (idx < InputCount()));
     if (kind_ == kTruncDivMod) {
       return kTagged;
-    } else if (kind_ == kSinCos) {
-      return kUnboxedDouble;
     } else {
       UNIMPLEMENTED();
       return kTagged;
@@ -7495,7 +7482,6 @@
 
   static const char* KindToCString(MergedMathInstr::Kind kind) {
     if (kind == kTruncDivMod) return "TruncDivMod";
-    if (kind == kSinCos) return "SinCos";
     UNIMPLEMENTED();
     return "";
   }
@@ -7908,6 +7894,8 @@
 
   Value* ValueAt(intptr_t ix) const { return values_[ix]; }
 
+  void PushValue(Value* value);
+
   intptr_t Length() const { return values_.length(); }
 
   Location LocationAt(intptr_t index) const {
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index a59a2856..afe7d11 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -6233,9 +6233,6 @@
 
     return;
   }
-  if (kind() == MergedMathInstr::kSinCos) {
-    UNIMPLEMENTED();
-  }
   UNIMPLEMENTED();
 }
 
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 5505c0b..006dd3b 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -5379,9 +5379,6 @@
     __ Bind(&done);
     return;
   }
-  if (kind() == MergedMathInstr::kSinCos) {
-    UNIMPLEMENTED();
-  }
   UNIMPLEMENTED();
 }
 
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index d15741d..7ccabe0 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -5658,37 +5658,11 @@
                                        Location::RegisterLocation(EDX)));
     return summary;
   }
-  if (kind() == MergedMathInstr::kSinCos) {
-    const intptr_t kNumInputs = 1;
-    const intptr_t kNumTemps = 2;
-    LocationSummary* summary = new (zone)
-        LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
-    // Because we always call into the runtime (LocationSummary::kCall) we
-    // must specify each input, temp, and output register explicitly.
-    summary->set_in(0, Location::FpuRegisterLocation(XMM1));
-    // EDI is chosen because it is callee saved so we do not need to back it
-    // up before calling into the runtime.
-    summary->set_temp(0, Location::RegisterLocation(EDI));
-    summary->set_temp(1, Location::RegisterLocation(EBX));
-    summary->set_out(0, Location::Pair(Location::FpuRegisterLocation(XMM2),
-                                       Location::FpuRegisterLocation(XMM3)));
-    return summary;
-  }
   UNIMPLEMENTED();
   return NULL;
 }
 
 
-typedef void (*SinCosCFunction)(double x, double* res_sin, double* res_cos);
-
-extern const RuntimeEntry kSinCosRuntimeEntry(
-    "libc_sincos",
-    reinterpret_cast<RuntimeFunction>(static_cast<SinCosCFunction>(&SinCos)),
-    1,
-    true,
-    true);
-
-
 void MergedMathInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   Label* deopt = NULL;
   if (CanDeoptimize()) {
@@ -5757,49 +5731,6 @@
     __ SmiTag(EDX);
     return;
   }
-
-  if (kind() == MergedMathInstr::kSinCos) {
-    ASSERT(locs()->out(0).IsPairLocation());
-    PairLocation* pair = locs()->out(0).AsPairLocation();
-    XmmRegister out1 = pair->At(0).fpu_reg();
-    XmmRegister out2 = pair->At(1).fpu_reg();
-
-    // Save ESP.
-    __ movl(locs()->temp(0).reg(), ESP);
-    // +-------------------------------+
-    // | double-argument               |  <- TOS
-    // +-------------------------------+
-    // | address-cos-result            |  +8
-    // +-------------------------------+
-    // | address-sin-result            |  +12
-    // +-------------------------------+
-    // | double-storage-for-cos-result |  +16
-    // +-------------------------------+
-    // | double-storage-for-sin-result |  +24
-    // +-------------------------------+
-    // ....
-    __ ReserveAlignedFrameSpace(kDoubleSize * 3 + kWordSize * 2);
-    __ movsd(Address(ESP, 0), locs()->in(0).fpu_reg());
-
-    Address cos_result(ESP, 2 * kWordSize + kDoubleSize);
-    Address sin_result(ESP, 2 * kWordSize + 2 * kDoubleSize);
-
-    // 'cos' result storage address.
-    __ leal(locs()->temp(1).reg(), cos_result);
-    __ movl(Address(ESP, kDoubleSize), locs()->temp(1).reg());
-
-    // 'sin' result storage address.
-    __ leal(locs()->temp(1).reg(), sin_result);
-    __ movl(Address(ESP, kDoubleSize + kWordSize), locs()->temp(1).reg());
-
-    __ CallRuntime(kSinCosRuntimeEntry, InputCount());
-    __ movsd(out2, sin_result);  // sin.
-    __ movsd(out1, cos_result);  // cos.
-    // Restore RSP.
-    __ movl(ESP, locs()->temp(0).reg());
-
-    return;
-  }
   UNIMPLEMENTED();
 }
 
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 27684c4..7cebfd7 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -5641,36 +5641,11 @@
                                        Location::RegisterLocation(RDX)));
     return summary;
   }
-  if (kind() == MergedMathInstr::kSinCos) {
-    const intptr_t kNumInputs = 1;
-    const intptr_t kNumTemps = 1;
-    LocationSummary* summary = new (zone)
-        LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
-    // Because we always call into the runtime (LocationSummary::kCall) we
-    // must specify each input, temp, and output register explicitly.
-    summary->set_in(0, Location::FpuRegisterLocation(XMM1));
-    // R13 is chosen because it is callee saved so we do not need to back it
-    // up before calling into the runtime.
-    summary->set_temp(0, Location::RegisterLocation(R13));
-    summary->set_out(0, Location::Pair(Location::FpuRegisterLocation(XMM2),
-                                       Location::FpuRegisterLocation(XMM3)));
-    return summary;
-  }
   UNIMPLEMENTED();
   return NULL;
 }
 
 
-typedef void (*SinCosCFunction)(double x, double* res_sin, double* res_cos);
-
-extern const RuntimeEntry kSinCosRuntimeEntry(
-    "libc_sincos",
-    reinterpret_cast<RuntimeFunction>(static_cast<SinCosCFunction>(&SinCos)),
-    1,
-    true,
-    true);
-
-
 void MergedMathInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   Label* deopt = NULL;
   if (CanDeoptimize()) {
@@ -5764,41 +5739,6 @@
     // in-range arguments, cannot create out-of-range result.
     return;
   }
-  if (kind() == MergedMathInstr::kSinCos) {
-    ASSERT(locs()->out(0).IsPairLocation());
-    PairLocation* pair = locs()->out(0).AsPairLocation();
-    XmmRegister out1 = pair->At(0).fpu_reg();
-    XmmRegister out2 = pair->At(1).fpu_reg();
-
-    // Save RSP.
-    __ movq(locs()->temp(0).reg(), RSP);
-    // +-------------------------------+
-    // | double-argument               |  <- TOS
-    // +-------------------------------+
-    // | address-cos-result            |  +8
-    // +-------------------------------+
-    // | address-sin-result            |  +16
-    // +-------------------------------+
-    // | double-storage-for-cos-result |  +24
-    // +-------------------------------+
-    // | double-storage-for-sin-result |  +32
-    // +-------------------------------+
-    // ....
-    __ ReserveAlignedFrameSpace(kDoubleSize * 3 + kWordSize * 2);
-    __ movsd(Address(RSP, 0), locs()->in(0).fpu_reg());
-
-    __ leaq(RDI, Address(RSP, 2 * kWordSize + kDoubleSize));
-    __ leaq(RSI, Address(RSP, 2 * kWordSize + 2 * kDoubleSize));
-    __ movaps(XMM0, locs()->in(0).fpu_reg());
-
-    __ CallRuntime(kSinCosRuntimeEntry, InputCount());
-    __ movsd(out2, Address(RSP, 2 * kWordSize + kDoubleSize * 2));  // sin.
-    __ movsd(out1, Address(RSP, 2 * kWordSize + kDoubleSize));      // cos.
-    // Restore RSP.
-    __ movq(RSP, locs()->temp(0).reg());
-
-    return;
-  }
   UNIMPLEMENTED();
 }
 
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 5e43f3a..c2a4e54 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -783,7 +783,6 @@
       single_step_(false),
       thread_registry_(new ThreadRegistry()),
       safepoint_handler_(new SafepointHandler(this)),
-      memory_high_watermark_(0),
       message_notify_callback_(NULL),
       name_(NULL),
       debugger_name_(NULL),
@@ -999,35 +998,10 @@
 }
 
 
-void Isolate::SetupInstructionsSnapshotPage(
-    const uint8_t* instructions_snapshot_buffer) {
-  InstructionsSnapshot snapshot(instructions_snapshot_buffer);
-#if defined(DEBUG)
-  if (FLAG_trace_isolates) {
-    OS::Print("Precompiled instructions are at [0x%" Px ", 0x%" Px ")\n",
-              reinterpret_cast<uword>(snapshot.instructions_start()),
-              reinterpret_cast<uword>(snapshot.instructions_start()) +
-                  snapshot.instructions_size());
-  }
-#endif
-  heap_->SetupExternalPage(snapshot.instructions_start(),
-                           snapshot.instructions_size(),
-                           /* is_executable = */ true);
-}
-
-
-void Isolate::SetupDataSnapshotPage(const uint8_t* data_snapshot_buffer) {
-  DataSnapshot snapshot(data_snapshot_buffer);
-#if defined(DEBUG)
-  if (FLAG_trace_isolates) {
-    OS::Print(
-        "Precompiled rodata are at [0x%" Px ", 0x%" Px ")\n",
-        reinterpret_cast<uword>(snapshot.data_start()),
-        reinterpret_cast<uword>(snapshot.data_start()) + snapshot.data_size());
-  }
-#endif
-  heap_->SetupExternalPage(snapshot.data_start(), snapshot.data_size(),
-                           /* is_executable = */ false);
+void Isolate::SetupImagePage(const uint8_t* image_buffer, bool is_executable) {
+  Image image(image_buffer);
+  heap_->SetupImagePage(image.object_start(), image.object_size(),
+                        is_executable);
 }
 
 
@@ -1681,9 +1655,11 @@
   if (FLAG_dump_megamorphic_stats) {
     MegamorphicCacheTable::PrintSizes(this);
   }
+  if (FLAG_dump_symbol_stats) {
+    Symbols::DumpStats(this);
+  }
   if (FLAG_trace_isolates) {
     heap()->PrintSizes();
-    Symbols::DumpStats();
     OS::Print(
         "[-] Stopping isolate:\n"
         "\tisolate:    %s\n",
@@ -2116,7 +2092,6 @@
     }
   }
 
-  jsobj.AddPropertyF("_memoryHighWatermark", "%" Pu "", memory_high_watermark_);
   jsobj.AddProperty("_threads", thread_registry_);
 }
 #endif
@@ -2715,7 +2690,6 @@
     // Ensure that the thread reports itself as being at a safepoint.
     thread->EnterSafepoint();
   }
-  UpdateMemoryHighWatermark();
   OSThread* os_thread = thread->os_thread();
   ASSERT(os_thread != NULL);
   os_thread->DisableThreadInterrupts();
@@ -2736,15 +2710,6 @@
 }
 
 
-void Isolate::UpdateMemoryHighWatermark() {
-  const uintptr_t thread_watermarks_total =
-      thread_registry()->ThreadHighWatermarksTotalLocked();
-  if (thread_watermarks_total > memory_high_watermark_) {
-    memory_high_watermark_ = thread_watermarks_total;
-  }
-}
-
-
 static RawInstance* DeserializeObject(Thread* thread,
                                       uint8_t* obj_data,
                                       intptr_t obj_len) {
@@ -2774,7 +2739,7 @@
                                      void* init_data,
                                      const char* script_url,
                                      const Function& func,
-                                     const Instance& message,
+                                     SerializedObjectBuffer* message_buffer,
                                      Monitor* spawn_count_monitor,
                                      intptr_t* spawn_count,
                                      const char* package_root,
@@ -2816,9 +2781,8 @@
     const String& class_name = String::Handle(cls.Name());
     class_name_ = NewConstChar(class_name.ToCString());
   }
-  bool can_send_any_object = true;
-  SerializeObject(message, &serialized_message_, &serialized_message_len_,
-                  can_send_any_object);
+  message_buffer->StealBuffer(&serialized_message_, &serialized_message_len_);
+
   // Inherit flags from spawning isolate.
   Isolate::Current()->FlagsCopyTo(isolate_flags());
 }
@@ -2829,8 +2793,8 @@
                                      const char* script_url,
                                      const char* package_root,
                                      const char* package_config,
-                                     const Instance& args,
-                                     const Instance& message,
+                                     SerializedObjectBuffer* args_buffer,
+                                     SerializedObjectBuffer* message_buffer,
                                      Monitor* spawn_count_monitor,
                                      intptr_t* spawn_count,
                                      bool paused,
@@ -2859,11 +2823,9 @@
       paused_(paused),
       errors_are_fatal_(errors_are_fatal) {
   function_name_ = NewConstChar("main");
-  bool can_send_any_object = false;
-  SerializeObject(args, &serialized_args_, &serialized_args_len_,
-                  can_send_any_object);
-  SerializeObject(message, &serialized_message_, &serialized_message_len_,
-                  can_send_any_object);
+  args_buffer->StealBuffer(&serialized_args_, &serialized_args_len_);
+  message_buffer->StealBuffer(&serialized_message_, &serialized_message_len_);
+
   // By default inherit flags from spawning isolate. These can be overridden
   // from the calling code.
   Isolate::Current()->FlagsCopyTo(isolate_flags());
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 79abc16..fe4da08 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -61,6 +61,7 @@
 class SafepointHandler;
 class SampleBuffer;
 class SendPort;
+class SerializedObjectBuffer;
 class ServiceIdZone;
 class Simulator;
 class StackResource;
@@ -178,7 +179,6 @@
 
   ThreadRegistry* thread_registry() const { return thread_registry_; }
   SafepointHandler* safepoint_handler() const { return safepoint_handler_; }
-  uintptr_t memory_high_watermark() const { return memory_high_watermark_; }
   ClassTable* class_table() { return &class_table_; }
   static intptr_t class_table_offset() {
     return OFFSET_OF(Isolate, class_table_);
@@ -254,9 +254,7 @@
     library_tag_handler_ = value;
   }
 
-  void SetupInstructionsSnapshotPage(
-      const uint8_t* instructions_snapshot_buffer);
-  void SetupDataSnapshotPage(const uint8_t* instructions_snapshot_buffer);
+  void SetupImagePage(const uint8_t* snapshot_buffer, bool is_executable);
 
   void ScheduleMessageInterrupts();
 
@@ -691,10 +689,6 @@
                         bool is_mutator,
                         bool bypass_safepoint = false);
 
-  // Updates the maximum memory usage in bytes of all zones in all threads of
-  // the current isolate.
-  void UpdateMemoryHighWatermark();
-
   // DEPRECATED: Use Thread's methods instead. During migration, these default
   // to using the mutator thread (which must also be the current thread).
   Zone* current_zone() const {
@@ -715,7 +709,6 @@
 
   ThreadRegistry* thread_registry_;
   SafepointHandler* safepoint_handler_;
-  uintptr_t memory_high_watermark_;
   Dart_MessageNotifyCallback message_notify_callback_;
   char* name_;
   char* debugger_name_;
@@ -921,7 +914,7 @@
                     void* init_data,
                     const char* script_url,
                     const Function& func,
-                    const Instance& message,
+                    SerializedObjectBuffer* message_buffer,
                     Monitor* spawn_count_monitor,
                     intptr_t* spawn_count,
                     const char* package_root,
@@ -935,8 +928,8 @@
                     const char* script_url,
                     const char* package_root,
                     const char* package_config,
-                    const Instance& args,
-                    const Instance& message,
+                    SerializedObjectBuffer* args_buffer,
+                    SerializedObjectBuffer* message_buffer,
                     Monitor* spawn_count_monitor,
                     intptr_t* spawn_count,
                     bool paused,
diff --git a/runtime/vm/isolate_test.cc b/runtime/vm/isolate_test.cc
index a7eab10..43bbd09 100644
--- a/runtime/vm/isolate_test.cc
+++ b/runtime/vm/isolate_test.cc
@@ -15,7 +15,8 @@
 
 UNIT_TEST_CASE(IsolateCurrent) {
   Dart_Isolate isolate = Dart_CreateIsolate(
-      NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL, NULL);
+      NULL, NULL, bin::core_isolate_snapshot_data,
+      bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   EXPECT_EQ(isolate, Dart_CurrentIsolate());
   Dart_ShutdownIsolate();
   EXPECT_EQ(reinterpret_cast<Dart_Isolate>(NULL), Dart_CurrentIsolate());
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index 1f56c09..a90ad37 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -3,12 +3,11 @@
 // BSD-style license that can be found in the LICENSE file.
 #if !defined(DART_PRECOMPILED_RUNTIME)
 
-#include <map>
-#include <vector>
-
 #include "platform/globals.h"
 #include "vm/flags.h"
+#include "vm/growable_array.h"
 #include "vm/kernel.h"
+#include "vm/kernel_to_il.h"
 #include "vm/os.h"
 
 #if defined(DEBUG)
@@ -153,47 +152,47 @@
   BlockStack() : current_count_(0) {}
 
   void EnterScope() {
-    variable_count_.push_back(current_count_);
+    variable_count_.Add(current_count_);
     current_count_ = 0;
   }
 
   void LeaveScope() {
-    variables_.resize(variables_.size() - current_count_);
-    current_count_ = variable_count_[variable_count_.size() - 1];
-    variable_count_.pop_back();
+    variables_.TruncateTo(variables_.length() - current_count_);
+    current_count_ = variable_count_[variable_count_.length() - 1];
+    variable_count_.RemoveLast();
   }
 
   T* Lookup(int index) {
-    ASSERT(static_cast<unsigned>(index) < variables_.size());
+    ASSERT(index < variables_.length());
     return variables_[index];
   }
 
   void Push(T* v) {
-    variables_.push_back(v);
+    variables_.Add(v);
     current_count_++;
   }
 
   void Push(List<T>* decl) {
     for (int i = 0; i < decl->length(); i++) {
-      variables_.push_back(decl[i]);
+      variables_.Add(decl[i]);
       current_count_++;
     }
   }
 
   void Pop(T* decl) {
-    variables_.resize(variables_.size() - 1);
+    variables_.RemoveLast();
     current_count_--;
   }
 
   void Pop(List<T>* decl) {
-    variables_.resize(variables_.size() - decl->length());
+    variables_.TruncateTo(variables_.length() - decl->length());
     current_count_ -= decl->length();
   }
 
  private:
   int current_count_;
-  std::vector<T*> variables_;
-  std::vector<int> variable_count_;
+  MallocGrowableArray<T*> variables_;
+  MallocGrowableArray<int> variable_count_;
 };
 
 
@@ -203,29 +202,35 @@
   BlockMap() : current_count_(0), stack_height_(0) {}
 
   void EnterScope() {
-    variable_count_.push_back(current_count_);
+    variable_count_.Add(current_count_);
     current_count_ = 0;
   }
 
   void LeaveScope() {
     stack_height_ -= current_count_;
-    current_count_ = variable_count_[variable_count_.size() - 1];
-    variable_count_.pop_back();
+    current_count_ = variable_count_[variable_count_.length() - 1];
+    variable_count_.RemoveLast();
   }
 
   int Lookup(T* object) {
-    ASSERT(variables_.find(object) != variables_.end());
-    if (variables_.find(object) == variables_.end()) FATAL("lookup failure");
-    return variables_[object];
+    typename MallocMap<T, int>::Pair* result = variables_.LookupPair(object);
+    ASSERT(result != NULL);
+    if (result == NULL) FATAL("lookup failure");
+    return RawPointerKeyValueTrait<T, int>::ValueOf(*result);
   }
 
   void Push(T* v) {
+    ASSERT(variables_.LookupPair(v) == NULL);
     int index = stack_height_++;
-    variables_[v] = index;
+    variables_.Insert(v, index);
     current_count_++;
   }
 
-  void Set(T* v, int index) { variables_[v] = index; }
+  void Set(T* v, int index) {
+    typename MallocMap<T, int>::Pair* entry = variables_.LookupPair(v);
+    ASSERT(entry != NULL);
+    entry->value = index;
+  }
 
   void Push(List<T>* decl) {
     for (int i = 0; i < decl->length(); i++) {
@@ -241,8 +246,8 @@
  private:
   int current_count_;
   int stack_height_;
-  std::map<T*, int> variables_;
-  std::vector<int> variable_count_;
+  MallocMap<T, int> variables_;
+  MallocGrowableArray<int> variable_count_;
 };
 
 
diff --git a/runtime/vm/kernel_reader.h b/runtime/vm/kernel_reader.h
index 3d20f90..092b90d 100644
--- a/runtime/vm/kernel_reader.h
+++ b/runtime/vm/kernel_reader.h
@@ -34,18 +34,18 @@
 class Mapping {
  public:
   bool Lookup(KernelType* node, VmType** handle) {
-    typename MapType::iterator value = map_.find(node);
-    if (value != map_.end()) {
-      *handle = value->second;
+    typename MapType::Pair* pair = map_.LookupPair(node);
+    if (pair != NULL) {
+      *handle = pair->value;
       return true;
     }
     return false;
   }
 
-  void Insert(KernelType* node, VmType* object) { map_[node] = object; }
+  void Insert(KernelType* node, VmType* object) { map_.Insert(node, object); }
 
  private:
-  typedef typename std::map<KernelType*, VmType*> MapType;
+  typedef MallocMap<KernelType, VmType*> MapType;
   MapType map_;
 };
 
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index 1596243..11a84e2 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -671,10 +671,11 @@
 
   if (node->async_marker() == FunctionNode::kSyncYielding) {
     LocalScope* scope = parsed_function_->node_sequence()->scope();
+    intptr_t offset = parsed_function_->function().num_fixed_parameters();
     for (intptr_t i = 0;
          i < parsed_function_->function().NumOptionalPositionalParameters();
          i++) {
-      scope->VariableAt(i)->set_is_forced_stack();
+      scope->VariableAt(offset + i)->set_is_forced_stack();
     }
   }
 
diff --git a/runtime/vm/kernel_to_il.h b/runtime/vm/kernel_to_il.h
index e518cee..1f374f5 100644
--- a/runtime/vm/kernel_to_il.h
+++ b/runtime/vm/kernel_to_il.h
@@ -75,8 +75,42 @@
       return pair->value;
     }
   }
+
+  inline Pair* LookupPair(const Key& key) {
+    return DirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Lookup(key);
+  }
 };
 
+template <typename K, typename V>
+class MallocMap
+    : public MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> > {
+ public:
+  typedef typename RawPointerKeyValueTrait<K, V>::Key Key;
+  typedef typename RawPointerKeyValueTrait<K, V>::Value Value;
+  typedef typename RawPointerKeyValueTrait<K, V>::Pair Pair;
+
+  inline void Insert(const Key& key, const Value& value) {
+    Pair pair(key, value);
+    MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Insert(pair);
+  }
+
+  inline V Lookup(const Key& key) {
+    Pair* pair =
+        MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Lookup(key);
+    if (pair == NULL) {
+      return V();
+    } else {
+      return pair->value;
+    }
+  }
+
+  inline Pair* LookupPair(const Key& key) {
+    return MallocDirectChainedHashMap<RawPointerKeyValueTrait<K, V> >::Lookup(
+        key);
+  }
+};
+
+
 class BreakableBlock;
 class CatchBlock;
 class FlowGraphBuilder;
diff --git a/runtime/vm/locations.h b/runtime/vm/locations.h
index c2d815b..2497264 100644
--- a/runtime/vm/locations.h
+++ b/runtime/vm/locations.h
@@ -32,7 +32,6 @@
   kUnboxedInt32x4,
   kUnboxedFloat64x2,
   kPairOfTagged,
-  kPairOfUnboxedDouble,
   kNumRepresentations
 };
 
diff --git a/runtime/vm/log_test.cc b/runtime/vm/log_test.cc
index 84ef855..aa95f09 100644
--- a/runtime/vm/log_test.cc
+++ b/runtime/vm/log_test.cc
@@ -16,7 +16,7 @@
 
 namespace dart {
 
-static const char* test_output_;
+static const char* test_output_ = NULL;
 static void TestPrinter(const char* format, ...) {
   // Measure.
   va_list args;
@@ -31,7 +31,10 @@
   OS::VSNPrint(buffer, (len + 1), format, args2);
   va_end(args2);
 
-  // Leaks buffer.
+  if (test_output_ != NULL) {
+    free(const_cast<char*>(test_output_));
+    test_output_ = NULL;
+  }
   test_output_ = buffer;
 }
 
@@ -42,6 +45,13 @@
     ASSERT(printer != NULL);
     log->printer_ = printer;
   }
+
+  static void FreeTestOutput() {
+    if (test_output_ != NULL) {
+      free(const_cast<char*>(test_output_));
+      test_output_ = NULL;
+    }
+  }
 };
 
 
@@ -54,6 +64,7 @@
   EXPECT_STREQ("Hello World", test_output_);
   THR_Print("SingleArgument");
   EXPECT_STREQ("SingleArgument", test_output_);
+  LogTestHelper::FreeTestOutput();
 }
 
 
@@ -64,6 +75,9 @@
   EXPECT_EQ(reinterpret_cast<const char*>(NULL), test_output_);
   log->Print("Hello %s", "World");
   EXPECT_STREQ("Hello World", test_output_);
+
+  delete log;
+  LogTestHelper::FreeTestOutput();
 }
 
 
@@ -84,6 +98,8 @@
     EXPECT_STREQ("BANANA", test_output_);
   }
   EXPECT_STREQ("APPLE", test_output_);
+  delete log;
+  LogTestHelper::FreeTestOutput();
 }
 
 }  // namespace dart
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index f98ec65..649ae66 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -332,6 +332,8 @@
   MessageStatus status = kOK;
   bool run_end_callback = false;
   bool delete_me = false;
+  EndCallback end_callback = NULL;
+  CallbackData callback_data = 0;
   {
     // We will occasionally release and reacquire this monitor in this
     // function. Whenever we reacquire the monitor we *must* process
@@ -414,7 +416,10 @@
         }
       }
       pool_ = NULL;
-      run_end_callback = true;
+      // Decide if we have a callback before releasing the monitor.
+      end_callback = end_callback_;
+      callback_data = callback_data_;
+      run_end_callback = end_callback_ != NULL;
       delete_me = delete_me_;
     }
 
@@ -424,11 +429,15 @@
     task_ = NULL;
   }
 
-  // Message handlers either use delete_me or end_callback but not both.
-  ASSERT(!delete_me || end_callback_ == NULL);
+  // The handler may have been deleted by another thread here if it is a native
+  // message handler.
 
-  if (run_end_callback && end_callback_ != NULL) {
-    end_callback_(callback_data_);
+  // Message handlers either use delete_me or end_callback but not both.
+  ASSERT(!delete_me || !run_end_callback);
+
+  if (run_end_callback) {
+    ASSERT(end_callback != NULL);
+    end_callback(callback_data);
     // The handler may have been deleted after this point.
   }
   if (delete_me) {
diff --git a/runtime/vm/metrics_test.cc b/runtime/vm/metrics_test.cc
index 3a559ba..3892372 100644
--- a/runtime/vm/metrics_test.cc
+++ b/runtime/vm/metrics_test.cc
@@ -16,8 +16,8 @@
 #ifndef PRODUCT
 
 UNIT_TEST_CASE(Metric_Simple) {
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   {
     Metric metric;
 
@@ -45,8 +45,8 @@
 };
 
 UNIT_TEST_CASE(Metric_OnDemand) {
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   {
     Thread* thread = Thread::Current();
     StackZone zone(thread);
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 7f85580..865e67f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1051,8 +1051,9 @@
     WritableVMIsolateScope scope(Thread::Current());
     PremarkingVisitor premarker;
     ASSERT(isolate->heap()->UsedInWords(Heap::kNew) == 0);
-    isolate->heap()->IterateOldObjectsNoEmbedderPages(&premarker);
+    isolate->heap()->IterateOldObjectsNoImagePages(&premarker);
     // Make the VM isolate read-only again after setting all objects as marked.
+    // Note objects in image pages are already pre-marked.
   }
 }
 
@@ -3501,7 +3502,7 @@
 
   const TokenStream& tkns = TokenStream::Handle(zone, scr.tokens());
   if (tkns.IsNull()) {
-    ASSERT(Dart::snapshot_kind() == Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() == Snapshot::kAppAOT);
     return TokenPosition::kNoSource;
   }
   TokenStream::Iterator tkit(zone, tkns, token_pos(),
@@ -7662,7 +7663,7 @@
   ASSERT(!scr.IsNull());
   const TokenStream& tkns = TokenStream::Handle(zone, scr.tokens());
   if (tkns.IsNull()) {
-    ASSERT(Dart::snapshot_kind() == Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() == Snapshot::kAppAOT);
     return String::null();
   }
   TokenStream::Iterator tkit(zone, tkns, token_pos());
@@ -8815,7 +8816,7 @@
 
   const TokenStream& token_stream = TokenStream::Handle(tokens());
   if (token_stream.IsNull()) {
-    ASSERT(Dart::snapshot_kind() == Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() == Snapshot::kAppAOT);
     return String::null();
   }
   return token_stream.GenerateSource();
@@ -9072,7 +9073,7 @@
 
   const TokenStream& tkns = TokenStream::Handle(zone, tokens());
   if (tkns.IsNull()) {
-    ASSERT((Dart::snapshot_kind() == Snapshot::kAppAOT));
+    ASSERT((Dart::vm_snapshot_kind() == Snapshot::kAppAOT));
     *line = -1;
     if (column != NULL) {
       *column = -1;
@@ -9230,7 +9231,7 @@
 RawString* Script::GetLine(intptr_t line_number, Heap::Space space) const {
   const String& src = String::Handle(Source());
   if (src.IsNull()) {
-    ASSERT(Dart::snapshot_kind() == Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() == Snapshot::kAppAOT);
     return Symbols::OptimizedOut().raw();
   }
   intptr_t relative_line_number = line_number - line_offset();
@@ -9280,7 +9281,7 @@
                               intptr_t to_column) const {
   const String& src = String::Handle(Source());
   if (src.IsNull()) {
-    ASSERT(Dart::snapshot_kind() == Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() == Snapshot::kAppAOT);
     return Symbols::OptimizedOut().raw();
   }
   intptr_t length = src.Length();
@@ -9794,6 +9795,10 @@
 
 
 RawObject* Library::GetMetadata(const Object& obj) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  COMPILE_ASSERT(!FLAG_enable_mirrors);
+  return Object::empty_array().raw();
+#else
   if (!obj.IsClass() && !obj.IsField() && !obj.IsFunction() &&
       !obj.IsLibrary() && !obj.IsTypeParameter()) {
     return Object::null();
@@ -9821,6 +9826,7 @@
     }
   }
   return metadata.raw();
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 
@@ -11206,7 +11212,7 @@
   }
   ASSERT(is_deferred_load());
   ASSERT(num_imports() == 1);
-  if (Dart::snapshot_kind() == Snapshot::kAppAOT) {
+  if (Dart::vm_snapshot_kind() == Snapshot::kAppAOT) {
     // The library list was tree-shaken away.
     this->set_is_loaded();
     return true;
@@ -12809,7 +12815,7 @@
 RawFunction* ICData::Owner() const {
   Object& obj = Object::Handle(raw_ptr()->owner_);
   if (obj.IsNull()) {
-    ASSERT(Dart::snapshot_kind() == Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() == Snapshot::kAppAOT);
     return Function::null();
   } else if (obj.IsFunction()) {
     return Function::Cast(obj).raw();
@@ -13997,7 +14003,7 @@
   uword code_entry = instrs.PayloadStart();
   const Array& table = Array::Handle(deopt_info_array());
   if (table.IsNull()) {
-    ASSERT(Dart::snapshot_kind() == Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() == Snapshot::kAppAOT);
     return TypedData::null();
   }
   // Linear search for the PC offset matching the target PC.
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index cf302d8..d010ec3 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1745,6 +1745,7 @@
   FINAL_HEAP_OBJECT_IMPLEMENTATION(TypeArguments, Object);
   friend class AbstractType;
   friend class Class;
+  friend class ClearTypeHashVisitor;
 };
 
 
@@ -4218,8 +4219,8 @@
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object);
   friend class Class;
   friend class Code;
-  friend class AssemblyInstructionsWriter;
-  friend class BlobInstructionsWriter;
+  friend class AssemblyImageWriter;
+  friend class BlobImageWriter;
 };
 
 
@@ -6013,6 +6014,7 @@
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Type, AbstractType);
   friend class Class;
   friend class TypeArguments;
+  friend class ClearTypeHashVisitor;
 };
 
 
@@ -6185,6 +6187,7 @@
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(TypeParameter, AbstractType);
   friend class Class;
+  friend class ClearTypeHashVisitor;
 };
 
 
@@ -6276,6 +6279,7 @@
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(BoundedType, AbstractType);
   friend class Class;
+  friend class ClearTypeHashVisitor;
 };
 
 
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 605f254..cd9fdee 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -149,7 +149,7 @@
 
   static void UnmarkAll(Isolate* isolate) {
     Unmarker unmarker;
-    isolate->heap()->VisitObjects(&unmarker);
+    isolate->heap()->VisitObjectsNoImagePages(&unmarker);
   }
 
  private:
@@ -213,7 +213,7 @@
   Stack stack(isolate());
 
   InstanceAccumulator accumulator(&stack, class_id);
-  isolate()->heap()->VisitObjects(&accumulator);
+  isolate()->heap()->VisitObjectsNoImagePages(&accumulator);
 
   stack.TraverseGraph(visitor);
   Unmarker::UnmarkAll(isolate());
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc
index a5998b9..181ff49 100644
--- a/runtime/vm/object_reload.cc
+++ b/runtime/vm/object_reload.cc
@@ -201,7 +201,7 @@
 //   This case is handled automatically.
 // 2) Enum values are reordered.
 //   We pair old and new enums and the old enums 'become' the new ones so
-//   the ordering is always correct (i.e. enum indicies match slots in values
+//   the ordering is always correct (i.e. enum indices match slots in values
 //   array)
 // 3) An existing enum value is removed.
 //   Each enum class has a canonical 'deleted' enum sentinel instance.
@@ -326,7 +326,7 @@
                                        deleted_enum_sentinel);
 
   if (enums_deleted) {
-    // Map all deleted enums to the deleted enum senintel value.
+    // Map all deleted enums to the deleted enum sentinel value.
     // TODO(johnmccutchan): Add this to the reload 'notices' list.
     VTIR_Print(
         "The following enum values were deleted from %s and will become the "
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 6d959cd..9768bc5 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -4,6 +4,7 @@
 
 #include "vm/pages.h"
 
+#include "platform/address_sanitizer.h"
 #include "platform/assert.h"
 #include "vm/compiler_stats.h"
 #include "vm/gc_marker.h"
@@ -69,6 +70,9 @@
   result->memory_ = memory;
   result->next_ = NULL;
   result->type_ = type;
+
+  LSAN_REGISTER_ROOT_REGION(result, sizeof(*result));
+
   return result;
 }
 
@@ -89,8 +93,21 @@
 
 
 void HeapPage::Deallocate() {
-  // The memory for this object will become unavailable after the delete below.
+  bool image_page = is_image_page();
+
+  if (!image_page) {
+    LSAN_UNREGISTER_ROOT_REGION(this, sizeof(*this));
+  }
+
+  // For a regular heap pages, the memory for this object will become
+  // unavailable after the delete below.
   delete memory_;
+
+  // For a heap page from a snapshot, the HeapPage object lives in the malloc
+  // heap rather than the page itself.
+  if (image_page) {
+    free(this);
+  }
 }
 
 
@@ -139,7 +156,7 @@
 
 
 void HeapPage::WriteProtect(bool read_only) {
-  ASSERT(!embedder_allocated());
+  ASSERT(!is_image_page());
 
   VirtualMemory::Protection prot;
   if (read_only) {
@@ -229,16 +246,16 @@
   } else {
     // Should not allocate executable pages when running from a precompiled
     // snapshot.
-    ASSERT(Dart::snapshot_kind() != Snapshot::kAppAOT);
+    ASSERT(Dart::vm_snapshot_kind() != Snapshot::kAppAOT);
 
     if (exec_pages_ == NULL) {
       exec_pages_ = page;
     } else {
-      if (FLAG_write_protect_code) {
+      if (FLAG_write_protect_code && !exec_pages_tail_->is_image_page()) {
         exec_pages_tail_->WriteProtect(false);
       }
       exec_pages_tail_->set_next(page);
-      if (FLAG_write_protect_code) {
+      if (FLAG_write_protect_code && !exec_pages_tail_->is_image_page()) {
         exec_pages_tail_->WriteProtect(true);
       }
     }
@@ -626,9 +643,18 @@
 }
 
 
-void PageSpace::VisitObjectsNoEmbedderPages(ObjectVisitor* visitor) const {
+void PageSpace::VisitObjectsNoImagePages(ObjectVisitor* visitor) const {
   for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
-    if (!it.page()->embedder_allocated()) {
+    if (!it.page()->is_image_page()) {
+      it.page()->VisitObjects(visitor);
+    }
+  }
+}
+
+
+void PageSpace::VisitObjectsImagePages(ObjectVisitor* visitor) const {
+  for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
+    if (it.page()->is_image_page()) {
       it.page()->VisitObjects(visitor);
     }
   }
@@ -682,7 +708,7 @@
     AbandonBumpAllocation();
   }
   for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
-    if (!it.page()->embedder_allocated()) {
+    if (!it.page()->is_image_page()) {
       it.page()->WriteProtect(read_only);
     }
   }
@@ -802,12 +828,14 @@
     HeapPage* page = exec_pages_;
     while (page != NULL) {
       ASSERT(page->type() == HeapPage::kExecutable);
-      page->WriteProtect(read_only);
+      if (!page->is_image_page()) {
+        page->WriteProtect(read_only);
+      }
       page = page->next();
     }
     page = large_pages_;
     while (page != NULL) {
-      if (page->type() == HeapPage::kExecutable) {
+      if (page->type() == HeapPage::kExecutable && !page->is_image_page()) {
         page->WriteProtect(read_only);
       }
       page = page->next();
@@ -1069,9 +1097,7 @@
 }
 
 
-void PageSpace::SetupExternalPage(void* pointer,
-                                  uword size,
-                                  bool is_executable) {
+void PageSpace::SetupImagePage(void* pointer, uword size, bool is_executable) {
   // Setup a HeapPage so precompiled Instructions can be traversed.
   // Instructions are contiguous at [pointer, pointer + size). HeapPage
   // expects to find objects at [memory->start() + ObjectStartOffset,
@@ -1080,7 +1106,7 @@
   pointer = reinterpret_cast<void*>(reinterpret_cast<uword>(pointer) - offset);
   size += offset;
 
-  VirtualMemory* memory = VirtualMemory::ForExternalPage(pointer, size);
+  VirtualMemory* memory = VirtualMemory::ForImagePage(pointer, size);
   ASSERT(memory != NULL);
   HeapPage* page = reinterpret_cast<HeapPage*>(malloc(sizeof(HeapPage)));
   page->memory_ = memory;
@@ -1095,18 +1121,18 @@
     first = &exec_pages_;
     tail = &exec_pages_tail_;
   } else {
-    page->type_ = HeapPage::kReadOnlyData;
+    page->type_ = HeapPage::kData;
     first = &pages_;
     tail = &pages_tail_;
   }
   if (*first == NULL) {
     *first = page;
   } else {
-    if (is_executable && FLAG_write_protect_code) {
+    if (is_executable && FLAG_write_protect_code && !(*tail)->is_image_page()) {
       (*tail)->WriteProtect(false);
     }
     (*tail)->set_next(page);
-    if (is_executable && FLAG_write_protect_code) {
+    if (is_executable && FLAG_write_protect_code && !(*tail)->is_image_page()) {
       (*tail)->WriteProtect(true);
     }
   }
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index b3aa2cd..0cf4388 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -28,7 +28,7 @@
 // A page containing old generation objects.
 class HeapPage {
  public:
-  enum PageType { kData = 0, kExecutable, kReadOnlyData, kNumPageTypes };
+  enum PageType { kData = 0, kExecutable, kNumPageTypes };
 
   HeapPage* next() const { return next_; }
   void set_next(HeapPage* next) { next_ = next; }
@@ -40,7 +40,7 @@
 
   PageType type() const { return type_; }
 
-  bool embedder_allocated() const { return memory_->embedder_allocated(); }
+  bool is_image_page() const { return !memory_->vm_owns_region(); }
 
   void VisitObjects(ObjectVisitor* visitor) const;
   void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
@@ -231,7 +231,8 @@
   bool IsValidAddress(uword addr) const { return Contains(addr); }
 
   void VisitObjects(ObjectVisitor* visitor) const;
-  void VisitObjectsNoEmbedderPages(ObjectVisitor* visitor) const;
+  void VisitObjectsNoImagePages(ObjectVisitor* visitor) const;
+  void VisitObjectsImagePages(ObjectVisitor* visitor) const;
   void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
 
   RawObject* FindObject(FindObjectVisitor* visitor,
@@ -317,7 +318,7 @@
   static intptr_t top_offset() { return OFFSET_OF(PageSpace, bump_top_); }
   static intptr_t end_offset() { return OFFSET_OF(PageSpace, bump_end_); }
 
-  void SetupExternalPage(void* pointer, uword size, bool is_executable);
+  void SetupImagePage(void* pointer, uword size, bool is_executable);
 
  private:
   // Ids for time and data records in Heap::GCStats.
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 9235268..e75d86d 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4868,6 +4868,9 @@
     declared_names.Add(enum_ident);
 
     // Create the static const field for the enumeration value.
+    // Note that we do not set the field type to E, because we temporarily store
+    // a Smi in the field. The class finalizer would detect the bad type and
+    // reset the value to sentinel.
     enum_value = Field::New(*enum_ident,
                             /* is_static = */ true,
                             /* is_final = */ true,
@@ -4890,18 +4893,28 @@
   }
   ExpectToken(Token::kRBRACE);
 
-  const Type& array_type = Type::Handle(Z, Type::ArrayType());
-  // Add static field 'const List values'.
+  const Class& array_class = Class::Handle(Z, I->object_store()->array_class());
+  TypeArguments& values_type_args =
+      TypeArguments::ZoneHandle(Z, TypeArguments::New(1));
+  const Type& enum_type = Type::Handle(Type::NewNonParameterizedType(cls));
+  values_type_args.SetTypeAt(0, enum_type);
+  Type& values_type = Type::ZoneHandle(
+      Z, Type::New(array_class, values_type_args, cls.token_pos(), Heap::kOld));
+  values_type ^= ClassFinalizer::FinalizeType(cls, values_type,
+                                              ClassFinalizer::kCanonicalize);
+  values_type_args = values_type.arguments();  // Get canonical type arguments.
+  // Add static field 'const List<E> values'.
   Field& values_field = Field::ZoneHandle(Z);
-  values_field =
-      Field::New(Symbols::Values(),
-                 /* is_static = */ true,
-                 /* is_final = */ true,
-                 /* is_const = */ true,
-                 /* is_reflectable = */ true, cls, array_type, cls.token_pos());
+  values_field = Field::New(Symbols::Values(),
+                            /* is_static = */ true,
+                            /* is_final = */ true,
+                            /* is_const = */ true,
+                            /* is_reflectable = */ true, cls, values_type,
+                            cls.token_pos());
   enum_members.AddField(values_field);
 
   // Add static field 'const _deleted_enum_sentinel'.
+  // This field does not need to be of type E.
   Field& deleted_enum_sentinel = Field::ZoneHandle(Z);
   deleted_enum_sentinel = Field::New(Symbols::_DeletedEnumSentinel(),
                                      /* is_static = */ true,
@@ -4914,6 +4927,7 @@
   // Allocate the immutable array containing the enumeration values.
   // The actual enum instance values will be patched in later.
   const Array& values_array = Array::Handle(Z, Array::New(i, Heap::kOld));
+  values_array.SetTypeArguments(values_type_args);
   values_field.SetStaticValue(values_array, true);
   values_field.RecordStore(values_array);
 
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 738ab2d..13c2b68 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -106,30 +106,38 @@
           StoreInstanceFieldInstr* store = it.Current()->AsStoreInstanceField();
           if (store != NULL) {
             if (!store->field().IsNull() && store->field().is_final()) {
+#ifndef PRODUCT
               if (FLAG_trace_precompiler && FLAG_support_il_printer) {
                 THR_Print("Found store to %s <- %s\n",
                           store->field().ToCString(),
                           store->value()->Type()->ToCString());
               }
+#endif  // !PRODUCT
               FieldTypePair* entry = field_map_->Lookup(&store->field());
               if (entry == NULL) {
                 field_map_->Insert(FieldTypePair(
                     &Field::Handle(zone_, store->field().raw()),  // Re-wrap.
                     store->value()->Type()->ToCid()));
+#ifndef PRODUCT
                 if (FLAG_trace_precompiler && FLAG_support_il_printer) {
                   THR_Print(" initial type = %s\n",
                             store->value()->Type()->ToCString());
                 }
+#endif  // !PRODUCT
                 continue;
               }
               CompileType type = CompileType::FromCid(entry->cid_);
+#ifndef PRODUCT
               if (FLAG_trace_precompiler && FLAG_support_il_printer) {
                 THR_Print(" old type = %s\n", type.ToCString());
               }
+#endif  // !PRODUCT
               type.Union(store->value()->Type());
+#ifndef PRODUCT
               if (FLAG_trace_precompiler && FLAG_support_il_printer) {
                 THR_Print(" new type = %s\n", type.ToCString());
               }
+#endif  // !PRODUCT
               entry->cid_ = type.ToCid();
             }
           }
@@ -1187,7 +1195,7 @@
         if (FLAG_trace_precompiler) {
           THR_Print("Precompiling initializer for %s\n", field.ToCString());
         }
-        ASSERT(Dart::snapshot_kind() != Snapshot::kAppAOT);
+        ASSERT(Dart::vm_snapshot_kind() != Snapshot::kAppAOT);
         const Function& initializer = Function::Handle(
             Z, CompileStaticInitializer(field, /* compute_type = */ true));
         ASSERT(!initializer.IsNull());
@@ -1226,10 +1234,12 @@
   if (compute_type && field.is_final()) {
     intptr_t result_cid = pipeline.result_type().ToCid();
     if (result_cid != kDynamicCid) {
+#ifndef PRODUCT
       if (FLAG_trace_precompiler && FLAG_support_il_printer) {
         THR_Print("Setting guarded_cid of %s to %s\n", field.ToCString(),
                   pipeline.result_type().ToCString());
       }
+#endif  // !PRODUCT
       field.set_guarded_cid(result_cid);
     }
   }
@@ -2543,6 +2553,7 @@
 
   RemapClassIds(old_to_new_cid);
   delete[] old_to_new_cid;
+  RehashTypes();  // Types use cid's as part of their hashes.
 }
 
 
@@ -2617,6 +2628,101 @@
 }
 
 
+class ClearTypeHashVisitor : public ObjectVisitor {
+ public:
+  explicit ClearTypeHashVisitor(Zone* zone)
+      : type_param_(TypeParameter::Handle(zone)),
+        type_(Type::Handle(zone)),
+        type_args_(TypeArguments::Handle(zone)),
+        bounded_type_(BoundedType::Handle(zone)) {}
+
+  void VisitObject(RawObject* obj) {
+    if (obj->IsTypeParameter()) {
+      type_param_ ^= obj;
+      type_param_.SetHash(0);
+    } 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);
+    }
+  }
+
+ private:
+  TypeParameter& type_param_;
+  Type& type_;
+  TypeArguments& type_args_;
+  BoundedType& bounded_type_;
+};
+
+
+void Precompiler::RehashTypes() {
+  // Clear all cached hash values.
+  {
+    HeapIterationScope his;
+    ClearTypeHashVisitor visitor(Z);
+    I->heap()->VisitObjects(&visitor);
+  }
+
+  // Rehash the canonical Types table.
+  ObjectStore* object_store = I->object_store();
+  GrowableObjectArray& types =
+      GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
+  Array& types_array = Array::Handle(Z);
+  Type& type = Type::Handle(Z);
+  {
+    CanonicalTypeSet types_table(Z, object_store->canonical_types());
+    types_array = HashTables::ToArray(types_table, false);
+    for (intptr_t i = 0; i < (types_array.Length() - 1); i++) {
+      type ^= types_array.At(i);
+      types.Add(type);
+    }
+    types_table.Release();
+  }
+
+  intptr_t dict_size = Utils::RoundUpToPowerOfTwo(types.Length() * 4 / 3);
+  types_array = HashTables::New<CanonicalTypeSet>(dict_size, Heap::kOld);
+  CanonicalTypeSet types_table(Z, types_array.raw());
+  for (intptr_t i = 0; i < types.Length(); i++) {
+    type ^= types.At(i);
+    bool present = types_table.Insert(type);
+    ASSERT(!present);
+  }
+  object_store->set_canonical_types(types_table.Release());
+
+  // Rehash the canonical TypeArguments table.
+  Array& typeargs_array = Array::Handle(Z);
+  GrowableObjectArray& typeargs =
+      GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
+  TypeArguments& typearg = TypeArguments::Handle(Z);
+  {
+    CanonicalTypeArgumentsSet typeargs_table(
+        Z, object_store->canonical_type_arguments());
+    typeargs_array = HashTables::ToArray(typeargs_table, false);
+    for (intptr_t i = 0; i < (typeargs_array.Length() - 1); i++) {
+      typearg ^= typeargs_array.At(i);
+      typeargs.Add(typearg);
+    }
+    typeargs_table.Release();
+  }
+
+  dict_size = Utils::RoundUpToPowerOfTwo(typeargs.Length() * 4 / 3);
+  typeargs_array =
+      HashTables::New<CanonicalTypeArgumentsSet>(dict_size, Heap::kOld);
+  CanonicalTypeArgumentsSet typeargs_table(Z, typeargs_array.raw());
+  for (intptr_t i = 0; i < typeargs.Length(); i++) {
+    typearg ^= typeargs.At(i);
+    bool present = typeargs_table.Insert(typearg);
+    ASSERT(!present);
+  }
+  object_store->set_canonical_type_arguments(typeargs_table.Release());
+}
+
+
 void Precompiler::VerifyJITFeedback() {
   if (jit_feedback_ == NULL) return;
 
diff --git a/runtime/vm/precompiler.h b/runtime/vm/precompiler.h
index 08fc79e..6f504f1 100644
--- a/runtime/vm/precompiler.h
+++ b/runtime/vm/precompiler.h
@@ -473,6 +473,7 @@
   void FinalizeAllClasses();
   void SortClasses();
   void RemapClassIds(intptr_t* old_to_new_cid);
+  void RehashTypes();
   void VerifyJITFeedback();
   RawScript* LookupScript(const char* uri);
   intptr_t MapCid(intptr_t feedback_cid);
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 7423157..b694518 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -609,8 +609,9 @@
   friend class RetainingPathVisitor;       // GetClassId
   friend class SkippedCodeFunctions;       // StorePointer
   friend class InstructionsReader;         // tags_ check
-  friend class AssemblyInstructionsWriter;
-  friend class BlobInstructionsWriter;
+  friend class ImageWriter;
+  friend class AssemblyImageWriter;
+  friend class BlobImageWriter;
   friend class SnapshotReader;
   friend class Deserializer;
   friend class SnapshotWriter;
@@ -1213,7 +1214,7 @@
   friend class SkippedCodeFunctions;
   friend class Function;
   friend class InstructionsReader;
-  friend class InstructionsWriter;
+  friend class ImageWriter;
 };
 
 
@@ -1761,7 +1762,6 @@
     return reinterpret_cast<RawObject**>(&ptr()->super_type_);
   }
   RawAbstractType* super_type_;
-  RawSmi* hash_;
   RawArray* mixin_types_;  // Array of AbstractType.
   RawObject** to() {
     return reinterpret_cast<RawObject**>(&ptr()->mixin_types_);
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index a067c4e..3350583 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -549,6 +549,9 @@
   const Object& result = Object::Handle(
       DartEntry::InvokeFunction(boot_function, Object::empty_array()));
   ASSERT(!result.IsNull());
+  if (result.IsUnwindError() || result.IsUnhandledException()) {
+    Exceptions::PropagateError(Error::Cast(result));
+  }
   Dart_Port port = ILLEGAL_PORT;
   if (result.IsReceivePort()) {
     port = ReceivePort::Cast(result).Id();
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index c992cc3..97f0d84 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -653,8 +653,9 @@
     char* actual_features =
         OS::StrNDup(features, buffer_len < 128 ? buffer_len : 128);
     OS::SNPrint(message_buffer, kMessageBufferSize,
-                "Wrong features in snapshot, expected '%s' found '%s'",
-                expected_features, actual_features);
+                "Snapshot not compatible with the current VM configuration: "
+                "the snapshot requires '%s' but the VM has '%s'",
+                actual_features, expected_features);
     free(const_cast<char*>(expected_features));
     free(actual_features);
     // This can also fail while bringing up the VM isolate, so make sure to
@@ -678,8 +679,8 @@
 }
 
 
-int32_t InstructionsWriter::GetOffsetFor(RawInstructions* instructions,
-                                         RawCode* code) {
+int32_t ImageWriter::GetOffsetFor(RawInstructions* instructions,
+                                  RawCode* code) {
 #if defined(PRODUCT)
   // Instructions are only dedup in product mode because it obfuscates profiler
   // results.
@@ -699,7 +700,7 @@
 }
 
 
-int32_t InstructionsWriter::GetObjectOffsetFor(RawObject* raw_object) {
+int32_t ImageWriter::GetObjectOffsetFor(RawObject* raw_object) {
   intptr_t heap_size = raw_object->Size();
   intptr_t offset = next_object_offset_;
   next_object_offset_ += heap_size;
@@ -708,21 +709,7 @@
 }
 
 
-static void EnsureIdentifier(char* label) {
-  for (char c = *label; c != '\0'; c = *++label) {
-    if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) ||
-        ((c >= '0') && (c <= '9'))) {
-      continue;
-    }
-    *label = '_';
-  }
-}
-
-
-void AssemblyInstructionsWriter::Write(uint8_t* vmisolate_buffer,
-                                       intptr_t vmisolate_length,
-                                       uint8_t* isolate_buffer,
-                                       intptr_t isolate_length) {
+void ImageWriter::Write(WriteStream* clustered_stream, bool vm) {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   NOT_IN_PRODUCT(TimelineDurationScope tds(thread, Timeline::GetIsolateStream(),
@@ -741,18 +728,73 @@
     data.obj_ = &Object::Handle(zone, data.raw_obj_);
   }
 
+  // Append the direct-mapped RO data objects after the clustered snapshot.
+  WriteROData(clustered_stream);
+
+  WriteText(clustered_stream, vm);
+}
+
+
+void ImageWriter::WriteROData(WriteStream* stream) {
+  stream->Align(OS::kMaxPreferredCodeAlignment);
+
+  // Heap page starts here.
+
+  stream->WriteWord(next_object_offset_);  // Data length.
+  COMPILE_ASSERT(OS::kMaxPreferredCodeAlignment >= kObjectAlignment);
+  stream->Align(OS::kMaxPreferredCodeAlignment);
+
+  // Heap page objects start here.
+
+  for (intptr_t i = 0; i < objects_.length(); i++) {
+    const Object& obj = *objects_[i].obj_;
+
+    NoSafepointScope no_safepoint;
+    uword start = reinterpret_cast<uword>(obj.raw()) - kHeapObjectTag;
+    uword end = start + obj.raw()->Size();
+
+    // Write object header with the mark and VM heap bits set.
+    uword marked_tags = obj.raw()->ptr()->tags_;
+    marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
+    marked_tags = RawObject::MarkBit::update(true, marked_tags);
+    stream->WriteWord(marked_tags);
+    start += sizeof(uword);
+    for (uword* cursor = reinterpret_cast<uword*>(start);
+         cursor < reinterpret_cast<uword*>(end); cursor++) {
+      stream->WriteWord(*cursor);
+    }
+  }
+}
+
+
+static void EnsureIdentifier(char* label) {
+  for (char c = *label; c != '\0'; c = *++label) {
+    if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) ||
+        ((c >= '0') && (c <= '9'))) {
+      continue;
+    }
+    *label = '_';
+  }
+}
+
+
+void AssemblyImageWriter::WriteText(WriteStream* clustered_stream, bool vm) {
+  Zone* zone = Thread::Current()->zone();
+
+  const char* instructions_symbol =
+      vm ? "_kDartVmSnapshotInstructions" : "_kDartIsolateSnapshotInstructions";
   assembly_stream_.Print(".text\n");
-  assembly_stream_.Print(".globl _kInstructionsSnapshot\n");
+  assembly_stream_.Print(".globl %s\n", instructions_symbol);
   // Start snapshot at page boundary.
   ASSERT(VirtualMemory::PageSize() >= OS::kMaxPreferredCodeAlignment);
   assembly_stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize());
-  assembly_stream_.Print("_kInstructionsSnapshot:\n");
+  assembly_stream_.Print("%s:\n", instructions_symbol);
 
   // This head also provides the gap to make the instructions snapshot
   // look like a HeapPage.
   intptr_t instructions_length = next_offset_;
   WriteWordLiteralText(instructions_length);
-  intptr_t header_words = InstructionsSnapshot::kHeaderSize / sizeof(uword);
+  intptr_t header_words = Image::kHeaderSize / sizeof(uword);
   for (intptr_t i = 1; i < header_words; i++) {
     WriteWordLiteralText(0);
   }
@@ -828,6 +870,8 @@
       }
     }
   }
+
+
 #if defined(TARGET_OS_LINUX)
   assembly_stream_.Print(".section .rodata\n");
 #elif defined(TARGET_OS_MACOS)
@@ -836,79 +880,27 @@
   // Unsupported platform.
   UNREACHABLE();
 #endif
-  assembly_stream_.Print(".globl _kDataSnapshot\n");
-  // Start snapshot at page boundary.
-  assembly_stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize());
-  assembly_stream_.Print("_kDataSnapshot:\n");
-  WriteWordLiteralData(next_object_offset_);  // Data length.
-  COMPILE_ASSERT(OS::kMaxPreferredCodeAlignment >= kObjectAlignment);
+
+  const char* data_symbol =
+      vm ? "_kDartVmSnapshotData" : "_kDartIsolateSnapshotData";
+  assembly_stream_.Print(".globl %s\n", data_symbol);
   assembly_stream_.Print(".balign %" Pd ", 0\n",
                          OS::kMaxPreferredCodeAlignment);
-
-  for (intptr_t i = 0; i < objects_.length(); i++) {
-    const Object& obj = *objects_[i].obj_;
-    assembly_stream_.Print("Precompiled_Obj_%d:\n", i);
-
-    NoSafepointScope no_safepoint;
-    uword start = reinterpret_cast<uword>(obj.raw()) - kHeapObjectTag;
-    uword end = start + obj.raw()->Size();
-
-    // Write object header with the mark and VM heap bits set.
-    uword marked_tags = obj.raw()->ptr()->tags_;
-    marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
-    marked_tags = RawObject::MarkBit::update(true, marked_tags);
-    WriteWordLiteralData(marked_tags);
-    start += sizeof(uword);
-    for (uword* cursor = reinterpret_cast<uword*>(start);
-         cursor < reinterpret_cast<uword*>(end); cursor++) {
-      WriteWordLiteralData(*cursor);
-    }
-  }
-
-
-  assembly_stream_.Print(".globl _kVmIsolateSnapshot\n");
-  assembly_stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize());
-  assembly_stream_.Print("_kVmIsolateSnapshot:\n");
-  for (intptr_t i = 0; i < vmisolate_length; i++) {
-    assembly_stream_.Print(".byte %" Pd "\n", vmisolate_buffer[i]);
-  }
-
-  assembly_stream_.Print(".globl _kIsolateSnapshot\n");
-  assembly_stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize());
-  assembly_stream_.Print("_kIsolateSnapshot:\n");
-  for (intptr_t i = 0; i < isolate_length; i++) {
-    assembly_stream_.Print(".byte %" Pd "\n", isolate_buffer[i]);
+  assembly_stream_.Print("%s:\n", data_symbol);
+  uint8_t* buffer = clustered_stream->buffer();
+  intptr_t length = clustered_stream->bytes_written();
+  for (intptr_t i = 0; i < length; i++) {
+    assembly_stream_.Print(".byte %" Pd "\n", buffer[i]);
   }
 }
 
 
-void BlobInstructionsWriter::Write(uint8_t* vmisolate_buffer,
-                                   intptr_t vmisolate_len,
-                                   uint8_t* isolate_buffer,
-                                   intptr_t isolate_length) {
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  NOT_IN_PRODUCT(TimelineDurationScope tds(thread, Timeline::GetIsolateStream(),
-                                           "WriteInstructions"));
-
-  // Handlify collected raw pointers as building the names below
-  // will allocate on the Dart heap.
-  for (intptr_t i = 0; i < instructions_.length(); i++) {
-    InstructionsData& data = instructions_[i];
-    data.insns_ = &Instructions::Handle(zone, data.raw_insns_);
-    ASSERT(data.raw_code_ != NULL);
-    data.code_ = &Code::Handle(zone, data.raw_code_);
-  }
-  for (intptr_t i = 0; i < objects_.length(); i++) {
-    ObjectData& data = objects_[i];
-    data.obj_ = &Object::Handle(zone, data.raw_obj_);
-  }
-
-  // This head also provides the gap to make the instructions snapshot
-  // look like a HeapPage.
+void BlobImageWriter::WriteText(WriteStream* clustered_stream, bool vm) {
+  // This header provides the gap to make the instructions snapshot look like a
+  // HeapPage.
   intptr_t instructions_length = next_offset_;
   instructions_blob_stream_.WriteWord(instructions_length);
-  intptr_t header_words = InstructionsSnapshot::kHeaderSize / sizeof(uword);
+  intptr_t header_words = Image::kHeaderSize / sizeof(uword);
   for (intptr_t i = 1; i < header_words; i++) {
     instructions_blob_stream_.WriteWord(0);
   }
@@ -959,38 +951,18 @@
       }
     }
   }
-
-  rodata_blob_stream_.WriteWord(next_object_offset_);  // Data length.
-  COMPILE_ASSERT(OS::kMaxPreferredCodeAlignment >= kObjectAlignment);
-  while (!Utils::IsAligned(rodata_blob_stream_.bytes_written(),
-                           OS::kMaxPreferredCodeAlignment)) {
-    rodata_blob_stream_.WriteWord(0);
-  }
-
-  for (intptr_t i = 0; i < objects_.length(); i++) {
-    const Object& obj = *objects_[i].obj_;
-
-    NoSafepointScope no_safepoint;
-    uword start = reinterpret_cast<uword>(obj.raw()) - kHeapObjectTag;
-    uword end = start + obj.raw()->Size();
-
-    // Write object header with the mark and VM heap bits set.
-    uword marked_tags = obj.raw()->ptr()->tags_;
-    marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
-    marked_tags = RawObject::MarkBit::update(true, marked_tags);
-    rodata_blob_stream_.WriteWord(marked_tags);
-    start += sizeof(uword);
-    for (uword* cursor = reinterpret_cast<uword*>(start);
-         cursor < reinterpret_cast<uword*>(end); cursor++) {
-      rodata_blob_stream_.WriteWord(*cursor);
-    }
-  }
 }
 
 
-uword InstructionsReader::GetInstructionsAt(int32_t offset) {
+RawInstructions* InstructionsReader::GetInstructionsAt(int32_t offset) {
   ASSERT(Utils::IsAligned(offset, OS::PreferredCodeAlignment()));
-  return reinterpret_cast<uword>(instructions_buffer_) + offset;
+
+  RawInstructions* result = reinterpret_cast<RawInstructions*>(
+      reinterpret_cast<uword>(instructions_buffer_) + offset + kHeapObjectTag);
+  ASSERT(result->IsInstructions());
+  ASSERT(result->IsMarked());
+
+  return result;
 }
 
 
@@ -1935,7 +1907,8 @@
 MessageWriter::MessageWriter(uint8_t** buffer,
                              ReAlloc alloc,
                              DeAlloc dealloc,
-                             bool can_send_any_object)
+                             bool can_send_any_object,
+                             intptr_t* buffer_len)
     : SnapshotWriter(Thread::Current(),
                      Snapshot::kMessage,
                      buffer,
@@ -1944,7 +1917,8 @@
                      kInitialSize,
                      &forward_list_,
                      can_send_any_object),
-      forward_list_(thread(), kMaxPredefinedObjectIds) {
+      forward_list_(thread(), kMaxPredefinedObjectIds),
+      buffer_len_(buffer_len) {
   ASSERT(buffer != NULL);
   ASSERT(alloc != NULL);
 }
@@ -1960,6 +1934,9 @@
   if (setjmp(*jump.Set()) == 0) {
     NoSafepointScope no_safepoint;
     WriteObject(obj.raw());
+    if (buffer_len_ != NULL) {
+      *buffer_len_ = BytesWritten();
+    }
   } else {
     FreeBuffer();
     ThrowException(exception_type(), exception_msg());
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 03ad684..487aaa9 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -190,7 +190,7 @@
     return (kind == kAppJIT) || (kind == kAppAOT);
   }
 
-  uint8_t* Addr() { return reinterpret_cast<uint8_t*>(this); }
+  const uint8_t* Addr() const { return reinterpret_cast<const uint8_t*>(this); }
 
   static intptr_t length_offset() {
     return OFFSET_OF(Snapshot, unaligned_length_);
@@ -211,19 +211,18 @@
 };
 
 
-class InstructionsSnapshot : ValueObject {
+class Image : ValueObject {
  public:
-  explicit InstructionsSnapshot(const void* raw_memory)
-      : raw_memory_(raw_memory) {
+  explicit Image(const void* raw_memory) : raw_memory_(raw_memory) {
     ASSERT(Utils::IsAligned(raw_memory, OS::kMaxPreferredCodeAlignment));
   }
 
-  void* instructions_start() {
+  void* object_start() {
     return reinterpret_cast<void*>(reinterpret_cast<uword>(raw_memory_) +
                                    kHeaderSize);
   }
 
-  uword instructions_size() {
+  uword object_size() {
     uword snapshot_size = *reinterpret_cast<const uword*>(raw_memory_);
     return snapshot_size - kHeaderSize;
   }
@@ -233,34 +232,7 @@
  private:
   const void* raw_memory_;  // The symbol kInstructionsSnapshot.
 
-  DISALLOW_COPY_AND_ASSIGN(InstructionsSnapshot);
-};
-
-
-class DataSnapshot : ValueObject {
- public:
-  explicit DataSnapshot(const void* raw_memory) : raw_memory_(raw_memory) {
-    ASSERT(Utils::IsAligned(raw_memory, 2 * kWordSize));  // kObjectAlignment
-  }
-
-  void* data_start() {
-    return reinterpret_cast<void*>(reinterpret_cast<uword>(raw_memory_) +
-                                   kHeaderSize);
-  }
-
-  uword data_size() {
-    uword snapshot_size = *reinterpret_cast<const uword*>(raw_memory_);
-    return snapshot_size - kHeaderSize;
-  }
-
-  // Header: data length and padding for alignment. We use the same alignment
-  // as for code for now.
-  static const intptr_t kHeaderSize = OS::kMaxPreferredCodeAlignment;
-
- private:
-  const void* raw_memory_;  // The symbol kDataSnapshot.
-
-  DISALLOW_COPY_AND_ASSIGN(DataSnapshot);
+  DISALLOW_COPY_AND_ASSIGN(Image);
 };
 
 
@@ -375,7 +347,7 @@
                             OS::PreferredCodeAlignment()));
   }
 
-  uword GetInstructionsAt(int32_t offset);
+  RawInstructions* GetInstructionsAt(int32_t offset);
   RawObject* GetObjectAt(int32_t offset);
 
  private:
@@ -660,7 +632,10 @@
     data[Snapshot::kSnapshotFlagIndex] = kind;
   }
 
-  void FreeBuffer() { dealloc_(stream_.buffer()); }
+  void FreeBuffer() {
+    dealloc_(stream_.buffer());
+    stream_.set_buffer(NULL);
+  }
 
  private:
   WriteStream stream_;
@@ -725,27 +700,31 @@
 };
 
 
-class InstructionsWriter : public ZoneAllocated {
+class ImageWriter : public ZoneAllocated {
  public:
-  InstructionsWriter()
-      : next_offset_(InstructionsSnapshot::kHeaderSize),
-        next_object_offset_(DataSnapshot::kHeaderSize),
-        instructions_(),
-        objects_() {}
-  virtual ~InstructionsWriter() {}
+  ImageWriter()
+      : next_offset_(0), next_object_offset_(0), instructions_(), objects_() {
+    ResetOffsets();
+  }
+  virtual ~ImageWriter() {}
 
+  void ResetOffsets() {
+    next_offset_ = Image::kHeaderSize;
+    next_object_offset_ = Image::kHeaderSize;
+    instructions_.Clear();
+    objects_.Clear();
+  }
   int32_t GetOffsetFor(RawInstructions* instructions, RawCode* code);
-
   int32_t GetObjectOffsetFor(RawObject* raw_object);
 
-  virtual void Write(uint8_t* vmisolate_buffer,
-                     intptr_t vmisolate_length,
-                     uint8_t* isolate_buffer,
-                     intptr_t isolate_length) = 0;
+  void Write(WriteStream* clustered_stream, bool vm);
   virtual intptr_t text_size() = 0;
-  virtual intptr_t data_size() = 0;
+  intptr_t data_size() { return next_object_offset_; }
 
  protected:
+  void WriteROData(WriteStream* stream);
+  virtual void WriteText(WriteStream* clustered_stream, bool vm) = 0;
+
   struct InstructionsData {
     explicit InstructionsData(RawInstructions* insns,
                               RawCode* code,
@@ -778,26 +757,21 @@
   GrowableArray<ObjectData> objects_;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(InstructionsWriter);
+  DISALLOW_COPY_AND_ASSIGN(ImageWriter);
 };
 
 
-class AssemblyInstructionsWriter : public InstructionsWriter {
+class AssemblyImageWriter : public ImageWriter {
  public:
-  AssemblyInstructionsWriter(uint8_t** assembly_buffer,
-                             ReAlloc alloc,
-                             intptr_t initial_size)
-      : InstructionsWriter(),
+  AssemblyImageWriter(uint8_t** assembly_buffer,
+                      ReAlloc alloc,
+                      intptr_t initial_size)
+      : ImageWriter(),
         assembly_stream_(assembly_buffer, alloc, initial_size),
-        text_size_(0),
-        data_size_(0) {}
+        text_size_(0) {}
 
-  virtual void Write(uint8_t* vmisolate_buffer,
-                     intptr_t vmisolate_length,
-                     uint8_t* isolate_buffer,
-                     intptr_t isolate_length);
+  virtual void WriteText(WriteStream* clustered_stream, bool vm);
   virtual intptr_t text_size() { return text_size_; }
-  virtual intptr_t data_size() { return data_size_; }
 
   intptr_t AssemblySize() const { return assembly_stream_.bytes_written(); }
 
@@ -812,55 +786,34 @@
     text_size_ += sizeof(value);
   }
 
-  void WriteWordLiteralData(uword value) {
-// Padding is helpful for comparing the .S with --disassemble.
-#if defined(ARCH_IS_64_BIT)
-    assembly_stream_.Print(".quad 0x%0.16" Px "\n", value);
-#else
-    assembly_stream_.Print(".long 0x%0.8" Px "\n", value);
-#endif
-    data_size_ += sizeof(value);
-  }
-
   WriteStream assembly_stream_;
   intptr_t text_size_;
-  intptr_t data_size_;
 
-  DISALLOW_COPY_AND_ASSIGN(AssemblyInstructionsWriter);
+  DISALLOW_COPY_AND_ASSIGN(AssemblyImageWriter);
 };
 
 
-class BlobInstructionsWriter : public InstructionsWriter {
+class BlobImageWriter : public ImageWriter {
  public:
-  BlobInstructionsWriter(uint8_t** instructions_blob_buffer,
-                         uint8_t** rodata_blob_buffer,
-                         ReAlloc alloc,
-                         intptr_t initial_size)
-      : InstructionsWriter(),
+  BlobImageWriter(uint8_t** instructions_blob_buffer,
+                  ReAlloc alloc,
+                  intptr_t initial_size)
+      : ImageWriter(),
         instructions_blob_stream_(instructions_blob_buffer,
                                   alloc,
-                                  initial_size),
-        rodata_blob_stream_(rodata_blob_buffer, alloc, initial_size) {}
+                                  initial_size) {}
 
-  virtual void Write(uint8_t* vmisolate_buffer,
-                     intptr_t vmisolate_length,
-                     uint8_t* isolate_buffer,
-                     intptr_t isolate_length);
+  virtual void WriteText(WriteStream* clustered_stream, bool vm);
   virtual intptr_t text_size() { return InstructionsBlobSize(); }
-  virtual intptr_t data_size() { return RodataBlobSize(); }
 
   intptr_t InstructionsBlobSize() const {
     return instructions_blob_stream_.bytes_written();
   }
-  intptr_t RodataBlobSize() const {
-    return rodata_blob_stream_.bytes_written();
-  }
 
  private:
   WriteStream instructions_blob_stream_;
-  WriteStream rodata_blob_stream_;
 
-  DISALLOW_COPY_AND_ASSIGN(BlobInstructionsWriter);
+  DISALLOW_COPY_AND_ASSIGN(BlobImageWriter);
 };
 
 
@@ -998,19 +951,47 @@
 };
 
 
+class SerializedObjectBuffer : public StackResource {
+ public:
+  SerializedObjectBuffer()
+      : StackResource(Thread::Current()),
+        object_data_(NULL),
+        object_length_(0) {}
+
+  virtual ~SerializedObjectBuffer() { free(object_data_); }
+
+  void StealBuffer(uint8_t** out_data, intptr_t* out_length) {
+    *out_data = object_data_;
+    *out_length = object_length_;
+
+    object_data_ = NULL;
+    object_length_ = 0;
+  }
+
+  uint8_t** data_buffer() { return &object_data_; }
+  intptr_t* data_length() { return &object_length_; }
+
+ private:
+  uint8_t* object_data_;
+  intptr_t object_length_;
+};
+
+
 class MessageWriter : public SnapshotWriter {
  public:
   static const intptr_t kInitialSize = 512;
   MessageWriter(uint8_t** buffer,
                 ReAlloc alloc,
                 DeAlloc dealloc,
-                bool can_send_any_object);
+                bool can_send_any_object,
+                intptr_t* buffer_len = NULL);
   ~MessageWriter() {}
 
   void WriteMessage(const Object& obj);
 
  private:
   ForwardList forward_list_;
+  intptr_t* buffer_len_;
 
   DISALLOW_COPY_AND_ASSIGN(MessageWriter);
 };
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index aa51a40..6d5b6e6 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -1164,7 +1164,7 @@
       "}\n";
   Dart_Handle result;
 
-  uint8_t* isolate_snapshot_buffer;
+  uint8_t* isolate_snapshot_data_buffer;
 
   // Start an Isolate, load a script and create a full snapshot.
   Timer timer1(true, "Snapshot_test");
@@ -1184,9 +1184,9 @@
 
     // Write snapshot with object content.
     {
-      FullSnapshotWriter writer(Snapshot::kCore, NULL, &isolate_snapshot_buffer,
-                                &malloc_allocator,
-                                NULL /* instructions_writer */);
+      FullSnapshotWriter writer(
+          Snapshot::kCore, NULL, &isolate_snapshot_data_buffer,
+          &malloc_allocator, NULL, NULL /* image_writer */);
       writer.WriteFullSnapshot();
     }
   }
@@ -1195,7 +1195,7 @@
   // from the script.
   Timer timer2(true, "Snapshot_test");
   timer2.Start();
-  TestCase::CreateTestIsolateFromSnapshot(isolate_snapshot_buffer);
+  TestCase::CreateTestIsolateFromSnapshot(isolate_snapshot_data_buffer);
   {
     Dart_EnterScope();  // Start a Dart API scope for invoking API functions.
     timer2.Stop();
@@ -1208,7 +1208,7 @@
     Dart_ExitScope();
   }
   Dart_ShutdownIsolate();
-  free(isolate_snapshot_buffer);
+  free(isolate_snapshot_data_buffer);
 }
 
 
@@ -1221,7 +1221,7 @@
   };
   const char* kScriptChars = kFullSnapshotScriptChars;
 
-  uint8_t* isolate_snapshot_buffer;
+  uint8_t* isolate_snapshot_data_buffer;
 
   // Start an Isolate, load a script and create a full snapshot.
   Timer timer1(true, "Snapshot_test");
@@ -1241,9 +1241,9 @@
 
     // Write snapshot with object content.
     {
-      FullSnapshotWriter writer(Snapshot::kCore, NULL, &isolate_snapshot_buffer,
-                                &malloc_allocator,
-                                NULL /* instructions_writer */);
+      FullSnapshotWriter writer(
+          Snapshot::kCore, NULL, &isolate_snapshot_data_buffer,
+          &malloc_allocator, NULL, NULL /* image_writer */);
       writer.WriteFullSnapshot();
     }
 
@@ -1257,7 +1257,7 @@
   // from the script.
   Timer timer2(true, "Snapshot_test");
   timer2.Start();
-  TestCase::CreateTestIsolateFromSnapshot(isolate_snapshot_buffer);
+  TestCase::CreateTestIsolateFromSnapshot(isolate_snapshot_data_buffer);
   {
     Dart_EnterScope();  // Start a Dart API scope for invoking API functions.
     timer2.Stop();
@@ -1274,7 +1274,7 @@
     Dart_ExitScope();
   }
   Dart_ShutdownIsolate();
-  free(isolate_snapshot_buffer);
+  free(isolate_snapshot_data_buffer);
 }
 
 
@@ -1661,10 +1661,13 @@
     // Use a script snapshot where a full snapshot is expected.
     char* error = NULL;
     Dart_Isolate isolate = Dart_CreateIsolate(
-        "script-uri", "main", script_snapshot, NULL, NULL, &error);
+        "script-uri", "main", script_snapshot, NULL, NULL, NULL, &error);
     EXPECT(isolate == NULL);
     EXPECT(error != NULL);
-    EXPECT_SUBSTRING("got 'script', expected 'core'", error);
+    EXPECT_SUBSTRING(
+        "Incompatible snapshot kinds:"
+        " vm 'core', isolate 'script'",
+        error);
     free(error);
   }
 
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 0d95289..38d5520 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -354,7 +354,6 @@
 }
 
 
-#if defined(DART_PRECOMPILER)
 void Symbols::Compact(Isolate* isolate) {
   ASSERT(isolate != Dart::vm_isolate());
   Zone* zone = Thread::Current()->zone();
@@ -397,7 +396,6 @@
   }
   isolate->object_store()->set_symbol_table(table.Release());
 }
-#endif  // DART_PRECOMPILER
 
 
 void Symbols::GetStats(Isolate* isolate, intptr_t* size, intptr_t* capacity) {
@@ -702,21 +700,19 @@
 }
 
 
-void Symbols::DumpStats() {
-  if (FLAG_dump_symbol_stats) {
-    intptr_t size = -1;
-    intptr_t capacity = -1;
-    // First dump VM symbol table stats.
-    GetStats(Dart::vm_isolate(), &size, &capacity);
-    OS::Print("VM Isolate: Number of symbols : %" Pd "\n", size);
-    OS::Print("VM Isolate: Symbol table capacity : %" Pd "\n", capacity);
-    // Now dump regular isolate symbol table stats.
-    GetStats(Isolate::Current(), &size, &capacity);
-    OS::Print("Isolate: Number of symbols : %" Pd "\n", size);
-    OS::Print("Isolate: Symbol table capacity : %" Pd "\n", capacity);
-    // TODO(koda): Consider recording growth and collision stats in HashTable,
-    // in DEBUG mode.
-  }
+void Symbols::DumpStats(Isolate* isolate) {
+  intptr_t size = -1;
+  intptr_t capacity = -1;
+  // First dump VM symbol table stats.
+  GetStats(Dart::vm_isolate(), &size, &capacity);
+  OS::Print("VM Isolate: Number of symbols : %" Pd "\n", size);
+  OS::Print("VM Isolate: Symbol table capacity : %" Pd "\n", capacity);
+  // Now dump regular isolate symbol table stats.
+  GetStats(isolate, &size, &capacity);
+  OS::Print("Isolate: Number of symbols : %" Pd "\n", size);
+  OS::Print("Isolate: Symbol table capacity : %" Pd "\n", capacity);
+  // TODO(koda): Consider recording growth and collision stats in HashTable,
+  // in DEBUG mode.
 }
 
 
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 8a0a161..cbc0bf2 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -573,10 +573,8 @@
 
   static RawArray* UnifiedSymbolTable();
 
-#if defined(DART_PRECOMPILER)
   // Treat the symbol table as weak and collect garbage.
   static void Compact(Isolate* isolate);
-#endif
 
   // Creates a Symbol given a C string that is assumed to contain
   // UTF-8 encoded characters and '\0' is considered a termination character.
@@ -639,7 +637,7 @@
     return reinterpret_cast<RawString**>(&predefined_);
   }
 
-  static void DumpStats();
+  static void DumpStats(Isolate* isolate);
 
   // Returns Symbol::Null if no symbol is found.
   template <typename StringType>
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 620e542..3ff121d 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -746,6 +746,12 @@
 }
 
 
+bool Thread::IsValidHandle(Dart_Handle object) const {
+  return IsValidLocalHandle(object) || IsValidZoneHandle(object) ||
+         IsValidScopedHandle(object);
+}
+
+
 bool Thread::IsValidLocalHandle(Dart_Handle object) const {
   ApiLocalScope* scope = api_top_scope_;
   while (scope != NULL) {
@@ -769,6 +775,18 @@
 }
 
 
+bool Thread::IsValidZoneHandle(Dart_Handle object) const {
+  Zone* zone = zone_;
+  while (zone != NULL) {
+    if (zone->handles()->IsValidZoneHandle(reinterpret_cast<uword>(object))) {
+      return true;
+    }
+    zone = zone->previous();
+  }
+  return false;
+}
+
+
 intptr_t Thread::CountZoneHandles() const {
   intptr_t count = 0;
   Zone* zone = zone_;
@@ -781,6 +799,18 @@
 }
 
 
+bool Thread::IsValidScopedHandle(Dart_Handle object) const {
+  Zone* zone = zone_;
+  while (zone != NULL) {
+    if (zone->handles()->IsValidScopedHandle(reinterpret_cast<uword>(object))) {
+      return true;
+    }
+    zone = zone->previous();
+  }
+  return false;
+}
+
+
 intptr_t Thread::CountScopedHandles() const {
   intptr_t count = 0;
   Zone* zone = zone_;
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 57a7c1f6..76a72ad 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -653,9 +653,12 @@
   // Visit all object pointers.
   void VisitObjectPointers(ObjectPointerVisitor* visitor, bool validate_frames);
 
+  bool IsValidHandle(Dart_Handle object) const;
   bool IsValidLocalHandle(Dart_Handle object) const;
   intptr_t CountLocalHandles() const;
+  bool IsValidZoneHandle(Dart_Handle object) const;
   intptr_t CountZoneHandles() const;
+  bool IsValidScopedHandle(Dart_Handle object) const;
   intptr_t CountScopedHandles() const;
   int ZoneSizeInBytes() const;
   void UnwindScopes(uword stack_marker);
diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
index c2c81a4..32d48a4 100644
--- a/runtime/vm/thread_registry.cc
+++ b/runtime/vm/thread_registry.cc
@@ -105,6 +105,19 @@
 #endif
 
 
+bool ThreadRegistry::IsValidHandle(Dart_Handle handle) const {
+  MonitorLocker ml(threads_lock());
+  Thread* current = active_list_;
+  while (current != NULL) {
+    if (current->IsValidHandle(handle)) {
+      return true;
+    }
+    current = current->next_;
+  }
+  return false;
+}
+
+
 intptr_t ThreadRegistry::CountZoneHandles() const {
   MonitorLocker ml(threads_lock());
   intptr_t count = 0;
@@ -182,16 +195,4 @@
   free_list_ = thread;
 }
 
-
-uintptr_t ThreadRegistry::ThreadHighWatermarksTotalLocked() const {
-  ASSERT(threads_lock()->IsOwnedByCurrentThread());
-  uintptr_t memory_high_watermarks_total = 0;
-  Thread* current = active_list_;
-  while (current != NULL) {
-    memory_high_watermarks_total += current->memory_high_watermark();
-    current = current->next_;
-  }
-  return memory_high_watermarks_total;
-}
-
 }  // namespace dart
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index e46c338..878479f 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -40,6 +40,7 @@
   // Calculates the sum of the max memory usage in bytes of each thread.
   uintptr_t ThreadHighWatermarksTotalLocked() const;
 
+  bool IsValidHandle(Dart_Handle handle) const;
   intptr_t CountZoneHandles() const;
   intptr_t CountScopedHandles() const;
 
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 058ed3f..b2b8d39 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -15,8 +15,8 @@
 
 UNIT_TEST_CASE(Mutex) {
   // This unit test case needs a running isolate.
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
 
   Mutex* mutex = new Mutex();
   mutex->Lock();
@@ -37,8 +37,8 @@
 
 UNIT_TEST_CASE(Monitor) {
   // This unit test case needs a running isolate.
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   OSThread* thread = OSThread::Current();
   // Thread interrupter interferes with this test, disable interrupts.
   thread->DisableThreadInterrupts();
@@ -321,14 +321,6 @@
   const char* json = stream.ToCString();
 
   Thread* current_thread = Thread::Current();
-  {
-    StackZone stack_zone(current_thread);
-    char* isolate_info_buf = OS::SCreate(current_thread->zone(),
-                                         "\"_memoryHighWatermark\":"
-                                         "\"%" Pu "\"",
-                                         isolate->memory_high_watermark());
-    EXPECT_SUBSTRING(isolate_info_buf, json);
-  }
 
   // Confirm all expected entries are in the JSON output.
   for (intptr_t i = 0; i < kTaskCount + 1; i++) {
@@ -389,14 +381,14 @@
   char* orig_str = orig_zone->PrintToString("foo");
   Dart_ExitIsolate();
   // Create and enter a new isolate.
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   Zone* zone0 = Thread::Current()->zone();
   EXPECT(zone0 != orig_zone);
   Dart_ShutdownIsolate();
   // Create and enter yet another isolate.
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   {
     // Create a stack resource this time, and exercise it.
     StackZone stack_zone(Thread::Current());
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index ce50f4d..cec6268 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -54,7 +54,7 @@
 Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer, const char* name) {
   char* err;
   Dart_Isolate isolate =
-      Dart_CreateIsolate(name, NULL, buffer, NULL, NULL, &err);
+      Dart_CreateIsolate(name, NULL, buffer, NULL, NULL, NULL, &err);
   if (isolate == NULL) {
     OS::Print("Creation of isolate failed '%s'\n", err);
     free(err);
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index f0c0fcc..945fd6e 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -11,6 +11,7 @@
 
 #include "vm/ast.h"
 #include "vm/dart.h"
+#include "vm/dart_api_state.h"
 #include "vm/globals.h"
 #include "vm/heap.h"
 #include "vm/isolate.h"
@@ -241,13 +242,11 @@
 
 
 namespace bin {
-// vm_isolate_snapshot_buffer points to a snapshot for the vm isolate if we
-// link in a snapshot otherwise it is initialized to NULL.
-extern const uint8_t* vm_isolate_snapshot_buffer;
-
-// isolate_snapshot_buffer points to a snapshot for an isolate if we link in a
-// snapshot otherwise it is initialized to NULL.
-extern const uint8_t* core_isolate_snapshot_buffer;
+// Snapshot pieces if we link in a snapshot, otherwise initialized to NULL.
+extern const uint8_t* vm_snapshot_data;
+extern const uint8_t* vm_snapshot_instructions;
+extern const uint8_t* core_isolate_snapshot_data;
+extern const uint8_t* core_isolate_snapshot_instructions;
 }
 
 
@@ -295,7 +294,7 @@
     return CreateIsolate(buffer, name);
   }
   static Dart_Isolate CreateTestIsolate(const char* name = NULL) {
-    return CreateIsolate(bin::core_isolate_snapshot_buffer, name);
+    return CreateIsolate(bin::core_isolate_snapshot_data, name);
   }
   static Dart_Handle library_handler(Dart_LibraryTag tag,
                                      Dart_Handle library,
@@ -539,6 +538,13 @@
 #define EXPECT_VALID(handle)                                                   \
   do {                                                                         \
     Dart_Handle tmp_handle = (handle);                                         \
+    if (!Api::IsValid(tmp_handle)) {                                           \
+      dart::Expect(__FILE__, __LINE__)                                         \
+          .Fail(                                                               \
+              "expected '%s' to be a valid handle but '%s' has already been "  \
+              "freed\n",                                                       \
+              #handle, #handle);                                               \
+    }                                                                          \
     if (Dart_IsError(tmp_handle)) {                                            \
       dart::Expect(__FILE__, __LINE__)                                         \
           .Fail(                                                               \
diff --git a/runtime/vm/virtual_memory.cc b/runtime/vm/virtual_memory.cc
index 93e3b84..38bb4b3 100644
--- a/runtime/vm/virtual_memory.cc
+++ b/runtime/vm/virtual_memory.cc
@@ -28,12 +28,12 @@
 }
 
 
-VirtualMemory* VirtualMemory::ForExternalPage(void* pointer, uword size) {
+VirtualMemory* VirtualMemory::ForImagePage(void* pointer, uword size) {
   // Memory for precompilated instructions was allocated by the embedder, so
   // create a VirtualMemory without allocating.
   MemoryRegion region(pointer, size);
   VirtualMemory* memory = new VirtualMemory(region);
-  memory->embedder_allocated_ = true;
+  memory->vm_owns_region_ = false;
   return memory;
 }
 
diff --git a/runtime/vm/virtual_memory.h b/runtime/vm/virtual_memory.h
index baa714d..4a7ecd2 100644
--- a/runtime/vm/virtual_memory.h
+++ b/runtime/vm/virtual_memory.h
@@ -64,9 +64,9 @@
   // Commit a reserved memory area, so that the memory can be accessed.
   bool Commit(uword addr, intptr_t size, bool is_executable);
 
-  bool embedder_allocated() const { return embedder_allocated_; }
+  bool vm_owns_region() const { return vm_owns_region_; }
 
-  static VirtualMemory* ForExternalPage(void* pointer, uword size);
+  static VirtualMemory* ForImagePage(void* pointer, uword size);
 
  private:
   static VirtualMemory* ReserveInternal(intptr_t size);
@@ -81,7 +81,7 @@
       : region_(region.pointer(), region.size()),
         reserved_size_(region.size()),
         handle_(handle),
-        embedder_allocated_(false) {}
+        vm_owns_region_(true) {}
 
   MemoryRegion region_;
 
@@ -93,8 +93,10 @@
 
   static uword page_size_;
 
-  // True for a region provided by the embedder.
-  bool embedder_allocated_;
+  // False for a part of a snapshot added directly to the Dart heap, which
+  // belongs to the the embedder and must not be deallocated or have its
+  // protection status changed by the VM.
+  bool vm_owns_region_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(VirtualMemory);
 };
diff --git a/runtime/vm/virtual_memory_android.cc b/runtime/vm/virtual_memory_android.cc
index bae5a82..6a151b2 100644
--- a/runtime/vm/virtual_memory_android.cc
+++ b/runtime/vm/virtual_memory_android.cc
@@ -54,7 +54,7 @@
 
 
 VirtualMemory::~VirtualMemory() {
-  if (!embedder_allocated()) {
+  if (vm_owns_region()) {
     unmap(address(), reserved_size_);
   }
 }
diff --git a/runtime/vm/virtual_memory_fuchsia.cc b/runtime/vm/virtual_memory_fuchsia.cc
index 0e627ec..08919db 100644
--- a/runtime/vm/virtual_memory_fuchsia.cc
+++ b/runtime/vm/virtual_memory_fuchsia.cc
@@ -13,9 +13,13 @@
 #include <unistd.h>
 
 #include "platform/assert.h"
+#include "vm/allocation.h"
+#include "vm/growable_array.h"
 #include "vm/isolate.h"
+#include "vm/lockers.h"
 #include "vm/memory_region.h"
 #include "vm/os.h"
+#include "vm/os_thread.h"
 
 // #define VIRTUAL_MEMORY_LOGGING 1
 #if defined(VIRTUAL_MEMORY_LOGGING)
@@ -30,6 +34,115 @@
 
 namespace dart {
 
+// The Magenta system call to protect memory regions (mx_vmar_protect) takes a
+// VM area (vmar) handle as first argument. We call VirtualMemory::Protect()
+// from the memory freelist code in vm/freelist.cc where the vmar handle is not
+// available. Additionally, there is no mx_vmar system call to retrieve a handle
+// for the leaf vmar given an address. Thus, when memory protections are
+// enabled, we maintain a sorted list of our leaf vmar handles that we can
+// query by address in calls to VirtualMemory::Protect().
+class VmarList : public AllStatic {
+ public:
+  static void AddVmar(mx_handle_t vmar, uword addr, intptr_t size);
+  static void RemoveVmar(uword addr);
+  static mx_handle_t LookupVmar(uword addr);
+
+ private:
+  static intptr_t LookupVmarIndexLocked(uword addr);
+
+  struct VmarListElement {
+    mx_handle_t vmar;
+    uword addr;
+    intptr_t size;
+  };
+
+  static Mutex* vmar_array_lock_;
+  static MallocGrowableArray<VmarListElement> vmar_array_;
+};
+
+Mutex* VmarList::vmar_array_lock_ = new Mutex();
+MallocGrowableArray<VmarList::VmarListElement> VmarList::vmar_array_;
+
+void VmarList::AddVmar(mx_handle_t vmar, uword addr, intptr_t size) {
+  MutexLocker ml(vmar_array_lock_);
+  LOG_INFO("AddVmar(%d, %lx, %ld)\n", vmar, addr, size);
+  // Sorted insert in increasing order.
+  const intptr_t length = vmar_array_.length();
+  intptr_t idx;
+  for (idx = 0; idx < length; idx++) {
+    const VmarListElement& m = vmar_array_.At(idx);
+    if (m.addr >= addr) {
+      break;
+    }
+  }
+#if defined(DEBUG)
+  if ((length > 0) && (idx < (length - 1))) {
+    const VmarListElement& m = vmar_array_.At(idx);
+    ASSERT(m.addr != addr);
+  }
+#endif
+  LOG_INFO("AddVmar(%d, %lx, %ld) at index = %ld\n", vmar, addr, size, idx);
+  VmarListElement new_mapping;
+  new_mapping.vmar = vmar;
+  new_mapping.addr = addr;
+  new_mapping.size = size;
+  vmar_array_.InsertAt(idx, new_mapping);
+}
+
+
+intptr_t VmarList::LookupVmarIndexLocked(uword addr) {
+  // Binary search for the vmar containing addr.
+  intptr_t imin = 0;
+  intptr_t imax = vmar_array_.length();
+  while (imax >= imin) {
+    const intptr_t imid = ((imax - imin) / 2) + imin;
+    const VmarListElement& mapping = vmar_array_.At(imid);
+    if ((mapping.addr + mapping.size) <= addr) {
+      imin = imid + 1;
+    } else if (mapping.addr > addr) {
+      imax = imid - 1;
+    } else {
+      return imid;
+    }
+  }
+  return -1;
+}
+
+
+mx_handle_t VmarList::LookupVmar(uword addr) {
+  MutexLocker ml(vmar_array_lock_);
+  LOG_INFO("LookupVmar(%lx)\n", addr);
+  const intptr_t idx = LookupVmarIndexLocked(addr);
+  if (idx == -1) {
+    LOG_ERR("LookupVmar(%lx) NOT FOUND\n", addr);
+    return MX_HANDLE_INVALID;
+  }
+  LOG_INFO("LookupVmar(%lx) found at %ld\n", addr, idx);
+  return vmar_array_[idx].vmar;
+}
+
+
+void VmarList::RemoveVmar(uword addr) {
+  MutexLocker ml(vmar_array_lock_);
+  LOG_INFO("RemoveVmar(%lx)\n", addr);
+  const intptr_t idx = LookupVmarIndexLocked(addr);
+  ASSERT(idx != -1);
+#if defined(DEBUG)
+  mx_handle_t vmar = vmar_array_[idx].vmar;
+#endif
+  // Swap idx to the end, and then RemoveLast()
+  const intptr_t length = vmar_array_.length();
+  for (intptr_t i = idx; i < length - 1; i++) {
+    vmar_array_.Swap(i, i + 1);
+  }
+#if defined(DEBUG)
+  const VmarListElement& mapping = vmar_array_.Last();
+  ASSERT(mapping.vmar == vmar);
+#endif
+  vmar_array_.RemoveLast();
+}
+
+
 uword VirtualMemory::page_size_ = 0;
 
 
@@ -51,14 +164,14 @@
             mx_status_get_string(status));
     return NULL;
   }
-
+  VmarList::AddVmar(vmar, addr, size);
   MemoryRegion region(reinterpret_cast<void*>(addr), size);
   return new VirtualMemory(region, vmar);
 }
 
 
 VirtualMemory::~VirtualMemory() {
-  if (!embedder_allocated()) {
+  if (vm_owns_region()) {
     mx_handle_t vmar = static_cast<mx_handle_t>(handle());
     mx_status_t status = mx_vmar_destroy(vmar);
     if (status != NO_ERROR) {
@@ -68,6 +181,7 @@
     if (status != NO_ERROR) {
       LOG_ERR("mx_handle_close failed: %s\n", mx_status_get_string(status));
     }
+    VmarList::RemoveVmar(start());
   }
 }
 
@@ -100,7 +214,8 @@
   mx_handle_t vmar = static_cast<mx_handle_t>(handle());
   const size_t offset = addr - start();
   const uint32_t flags = MX_VM_FLAG_SPECIFIC | MX_VM_FLAG_PERM_READ |
-                         MX_VM_FLAG_PERM_WRITE | MX_VM_FLAG_PERM_EXECUTE;
+                         MX_VM_FLAG_PERM_WRITE |
+                         (executable ? MX_VM_FLAG_PERM_EXECUTE : 0);
   uintptr_t mapped_addr;
   status = mx_vmar_map(vmar, offset, vmo, 0, size, flags, &mapped_addr);
   if (status != NO_ERROR) {
@@ -110,15 +225,55 @@
     return false;
   }
   if (addr != mapped_addr) {
+    mx_handle_close(vmo);
     LOG_ERR("mx_vmar_map: addr != mapped_addr: %lx != %lx\n", addr,
             mapped_addr);
     return false;
   }
+  mx_handle_close(vmo);
+  LOG_INFO("Commit(%lx, %ld, %s): success\n", addr, size,
+           executable ? "executable" : "");
   return true;
 }
 
 
 bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
+  ASSERT(Thread::Current()->IsMutatorThread() ||
+         Isolate::Current()->mutator_thread()->IsAtSafepoint());
+  const uword start_address = reinterpret_cast<uword>(address);
+  const uword end_address = start_address + size;
+  const uword page_address = Utils::RoundDown(start_address, PageSize());
+  mx_handle_t vmar = VmarList::LookupVmar(page_address);
+  ASSERT(vmar != MX_HANDLE_INVALID);
+  uint32_t prot = 0;
+  switch (mode) {
+    case kNoAccess:
+      // MG-426: mx_vmar_protect() requires at least on permission.
+      prot = MX_VM_FLAG_PERM_READ;
+      break;
+    case kReadOnly:
+      prot = MX_VM_FLAG_PERM_READ;
+      break;
+    case kReadWrite:
+      prot = MX_VM_FLAG_PERM_READ | MX_VM_FLAG_PERM_WRITE;
+      break;
+    case kReadExecute:
+      prot = MX_VM_FLAG_PERM_READ | MX_VM_FLAG_PERM_EXECUTE;
+      break;
+    case kReadWriteExecute:
+      prot = MX_VM_FLAG_PERM_READ | MX_VM_FLAG_PERM_WRITE |
+             MX_VM_FLAG_PERM_EXECUTE;
+      break;
+  }
+  mx_status_t status =
+      mx_vmar_protect(vmar, page_address, end_address - page_address, prot);
+  if (status != NO_ERROR) {
+    LOG_ERR("mx_vmar_protect(%lx, %lx, %x) success: %s\n", page_address,
+            end_address - page_address, prot, mx_status_get_string(status));
+    return false;
+  }
+  LOG_INFO("mx_vmar_protect(%lx, %lx, %x) success\n", page_address,
+           end_address - page_address, prot);
   return true;
 }
 
diff --git a/runtime/vm/virtual_memory_linux.cc b/runtime/vm/virtual_memory_linux.cc
index 3c4abec..cc57139 100644
--- a/runtime/vm/virtual_memory_linux.cc
+++ b/runtime/vm/virtual_memory_linux.cc
@@ -53,7 +53,7 @@
 
 
 VirtualMemory::~VirtualMemory() {
-  if (!embedder_allocated()) {
+  if (vm_owns_region()) {
     unmap(address(), reserved_size_);
   }
 }
diff --git a/runtime/vm/virtual_memory_macos.cc b/runtime/vm/virtual_memory_macos.cc
index c3b004d..bf77b66 100644
--- a/runtime/vm/virtual_memory_macos.cc
+++ b/runtime/vm/virtual_memory_macos.cc
@@ -54,7 +54,7 @@
 
 
 VirtualMemory::~VirtualMemory() {
-  if (!embedder_allocated()) {
+  if (vm_owns_region()) {
     unmap(address(), reserved_size_);
   }
 }
diff --git a/runtime/vm/virtual_memory_win.cc b/runtime/vm/virtual_memory_win.cc
index 7e876a4..0f4b179 100644
--- a/runtime/vm/virtual_memory_win.cc
+++ b/runtime/vm/virtual_memory_win.cc
@@ -35,7 +35,7 @@
 
 
 VirtualMemory::~VirtualMemory() {
-  if (embedder_allocated() || (reserved_size_ == 0)) {
+  if (!vm_owns_region() || (reserved_size_ == 0)) {
     return;
   }
   if (VirtualFree(address(), 0, MEM_RELEASE) == 0) {
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc
index 05e7eb7..b4c8e31 100644
--- a/runtime/vm/zone.cc
+++ b/runtime/vm/zone.cc
@@ -6,6 +6,7 @@
 
 #include "platform/assert.h"
 #include "platform/utils.h"
+#include "vm/dart_api_state.h"
 #include "vm/flags.h"
 #include "vm/handles_impl.h"
 #include "vm/heap.h"
@@ -46,9 +47,10 @@
   Thread* current_thread = Thread::Current();
   while (current != NULL) {
     if (current_thread != NULL) {
-      // TODO(bkonyi) Handle special case of segment deletion within native
-      // isolate.
       current_thread->DecrementMemoryUsage(current->size());
+    } else if (ApiNativeScope::Current() != NULL) {
+      // If there is no current thread, we might be inside of a native scope.
+      ApiNativeScope::DecrementNativeScopeMemoryUsage(current->size());
     }
     Segment* next = current->next();
 #ifdef DEBUG
@@ -74,15 +76,19 @@
 #endif
   result->next_ = next;
   result->size_ = size;
-  if (Thread::Current() != NULL) {
-    // TODO(bkonyi) Handle special case of segment creation within native
-    // isolate.
-    Thread::Current()->IncrementMemoryUsage(size);
+  Thread* current = Thread::Current();
+  if (current != NULL) {
+    current->IncrementMemoryUsage(size);
+  } else if (ApiNativeScope::Current() != NULL) {
+    // If there is no current thread, we might be inside of a native scope.
+    ApiNativeScope::IncrementNativeScopeMemoryUsage(size);
   }
   return result;
 }
 
-
+// TODO(bkonyi): We need to account for the initial chunk size when a new zone
+// is created within a new thread or ApiNativeScope when calculating high
+// watermarks or memory consumption.
 Zone::Zone()
     : initial_buffer_(buffer_, kInitialChunkSize),
       position_(initial_buffer_.start()),
@@ -117,7 +123,6 @@
   if (large_segments_ != NULL) {
     Segment::DeleteSegmentList(large_segments_);
   }
-
 // Reset zone state.
 #ifdef DEBUG
   memset(initial_buffer_.pointer(), kZapDeletedByte, initial_buffer_.size());
diff --git a/runtime/vm/zone_test.cc b/runtime/vm/zone_test.cc
index cb7b0c4..21b50c0 100644
--- a/runtime/vm/zone_test.cc
+++ b/runtime/vm/zone_test.cc
@@ -14,8 +14,8 @@
 #if defined(DEBUG)
   FLAG_trace_zones = true;
 #endif
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   Thread* thread = Thread::Current();
   EXPECT(thread->zone() == NULL);
   {
@@ -76,8 +76,8 @@
 #if defined(DEBUG)
   FLAG_trace_zones = true;
 #endif
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   Thread* thread = Thread::Current();
   EXPECT(thread->zone() == NULL);
   {
@@ -100,8 +100,8 @@
 #if defined(DEBUG)
   FLAG_trace_zones = true;
 #endif
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   Thread* thread = Thread::Current();
   EXPECT(thread->zone() == NULL);
   {
@@ -119,8 +119,8 @@
 #if defined(DEBUG)
   FLAG_trace_zones = true;
 #endif
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   Thread* thread = Thread::Current();
   EXPECT(thread->zone() == NULL);
   static int marker;
@@ -175,8 +175,8 @@
 #if defined(DEBUG)
   FLAG_trace_zones = true;
 #endif
-  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_buffer, NULL, NULL,
-                     NULL);
+  Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data,
+                     bin::core_isolate_snapshot_instructions, NULL, NULL, NULL);
   Thread* thread = Thread::Current();
   EXPECT(thread->zone() == NULL);
   {
@@ -228,4 +228,20 @@
 }
 #endif
 
+
+UNIT_TEST_CASE(NativeScopeZoneAllocation) {
+  ASSERT(ApiNativeScope::Current() == NULL);
+  ASSERT(Thread::Current() == NULL);
+  EXPECT_EQ(0, ApiNativeScope::current_memory_usage());
+  {
+    ApiNativeScope scope;
+    EXPECT_EQ(scope.zone()->CapacityInBytes(),
+              ApiNativeScope::current_memory_usage());
+    (void)Dart_ScopeAllocate(2048);
+    EXPECT_EQ(scope.zone()->CapacityInBytes(),
+              ApiNativeScope::current_memory_usage());
+  }
+  EXPECT_EQ(0, ApiNativeScope::current_memory_usage());
+}
+
 }  // namespace dart
diff --git a/samples/samples.status b/samples/samples.status
index d6e08b9..caf91ca 100644
--- a/samples/samples.status
+++ b/samples/samples.status
@@ -25,6 +25,3 @@
 
 [ $compiler == app_jit ]
 sample_extension/test/*: Skip # Shared use of a temp directory
-
-[ $builder_tag == asan && $arch == x64 ]
-sample_extension/test/sample_extension_app_snapshot_test: RuntimeError # Leak in subprocess
diff --git a/sdk/lib/_internal/js_runtime/lib/constant_map.dart b/sdk/lib/_internal/js_runtime/lib/constant_map.dart
index 9e98b13..693197b 100644
--- a/sdk/lib/_internal/js_runtime/lib/constant_map.dart
+++ b/sdk/lib/_internal/js_runtime/lib/constant_map.dart
@@ -98,8 +98,8 @@
   _fetch(key) => jsPropertyAccess(_jsObject, key);
 
   void forEach(void f(K key, V value)) {
-    // Use a JS 'cast' to get efficient loop.  Type inferrence doesn't get this
-    // since constant map representation is chosen after type inferrence and the
+    // Use a JS 'cast' to get efficient loop.  Type inference doesn't get this
+    // since constant map representation is chosen after type inference and the
     // instantiation is shortcut by the compiler.
     var keys = _keysArray;
     for (int i = 0; i < keys.length; i++) {
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index ba537fd..af96764 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -500,6 +500,7 @@
 }
 
 // Patch for 'identical' function.
+@NoInline() // No inlining since we recognize the call in optimizer.
 @patch
 bool identical(Object a, Object b) {
   return JS('bool', '(# == null ? # == null : # === #)', a, b, a, b);
diff --git a/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart b/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart
index b298e0d..f321f39 100644
--- a/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/foreign_helper.dart
@@ -7,7 +7,7 @@
 import 'dart:_js_embedded_names' show JsGetName, JsBuiltin;
 
 /**
- * Emits a JavaScript code fragment parameterized by arguments.
+ * Emits a JavaScript code fragment parametrized by arguments.
  *
  * Hash characters `#` in the [codeTemplate] are replaced in left-to-right order
  * with expressions that contain the values of, or evaluate to, the arguments.
diff --git a/sdk/lib/_internal/js_runtime/lib/js_rti.dart b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
index 2ba517c..de7db23 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_rti.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
@@ -169,11 +169,7 @@
     return rawRtiToJsConstructorName(rti);
   }
   if (rti is int) {
-    if (onTypeVariable == null) {
-      return rti.toString();
-    } else {
-      return onTypeVariable(rti);
-    }
+    return '${onTypeVariable == null ? rti : onTypeVariable(rti)}';
   }
   if (JS('bool', 'typeof #.func != "undefined"', rti)) {
     // If the RTI has typedef equivalence info (via mirrors), use that since the
diff --git a/sdk/lib/_internal/js_runtime/lib/string_helper.dart b/sdk/lib/_internal/js_runtime/lib/string_helper.dart
index 8ec6c47..78a0980 100644
--- a/sdk/lib/_internal/js_runtime/lib/string_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/string_helper.dart
@@ -142,7 +142,7 @@
   if (pattern is String) {
     if (pattern == "") {
       if (receiver == "") {
-        return replacement;
+        return JS('String', '#', replacement); // help type inference.
       } else {
         StringBuffer result = new StringBuffer('');
         int length = receiver.length;
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index 674fffd..49b2460 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -497,7 +497,7 @@
    * with a `test` parameter, instead of handling both value and error in a
    * single [then] call.
    */
-  Future<S> then<S>(onValue(T value), { Function onError });
+  Future<S> then<S>(FutureOr<S> onValue(T value), { Function onError });
 
   /**
    * Handles errors emitted by this [Future].
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index 6e0b55b..4e6ba42 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -231,11 +231,11 @@
   }
 
   Future<E> then<E>(
-      dynamic/*E|Future<E>*/ f(T value), { Function onError }) {
+      FutureOr<E> f(T value), { Function onError }) {
     Zone currentZone = Zone.current;
     ZoneUnaryCallback registered;
     if (!identical(currentZone, _ROOT_ZONE)) {
-      f = currentZone.registerUnaryCallback<dynamic, T>(f);
+      f = currentZone.registerUnaryCallback<FutureOr<E>, T>(f);
       if (onError != null) {
         onError = _registerErrorHandler<T>(onError, currentZone);
       }
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 3608135..f484cfb 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -890,7 +890,7 @@
 
   /**
    * Discards all data on the stream, but signals when it's done or an error
-   * occured.
+   * occurred.
    *
    * When subscribing using [drain], cancelOnError will be true. This means
    * that the future will complete with the first error on the stream and then
@@ -1623,7 +1623,7 @@
    * Returns the same future as [done].
    *
    * The stream sink may close before the [close] method is called, either due
-   * to an error or because it is itself provding events to someone who has
+   * to an error or because it is itself providing events to someone who has
    * stopped listening. In that case, the [done] future is completed first,
    * and the `close` method will return the `done` future when called.
    *
diff --git a/sdk/lib/async/stream_transformers.dart b/sdk/lib/async/stream_transformers.dart
index 7542c6b..fa32bc4 100644
--- a/sdk/lib/async/stream_transformers.dart
+++ b/sdk/lib/async/stream_transformers.dart
@@ -270,7 +270,7 @@
  *
  * Instead of implementing three classes: a [StreamTransformer], a [Stream]
  * (as the result of a `bind` call) and a [StreamSubscription] (which does the
- * actual work), this class only requires a fincution that is invoked when the
+ * actual work), this class only requires a function that is invoked when the
  * last bit (the subscription) of the transformer-workflow is needed.
  *
  * The given transformer function maps from Stream and cancelOnError to a
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart
index 75f2fcf..806aa80 100644
--- a/sdk/lib/collection/set.dart
+++ b/sdk/lib/collection/set.dart
@@ -27,7 +27,7 @@
 abstract class SetMixin<E> implements Set<E> {
   // This class reimplements all of [IterableMixin].
   // If/when Dart mixins get more powerful, we should just create a single
-  // Mixin class from IterableMixin and the new methods of thisclass.
+  // Mixin class from IterableMixin and the new methods of this class.
 
   bool add(E element);
 
diff --git a/sdk/lib/convert/html_escape.dart b/sdk/lib/convert/html_escape.dart
index 3a516bb..7070e1a 100644
--- a/sdk/lib/convert/html_escape.dart
+++ b/sdk/lib/convert/html_escape.dart
@@ -7,7 +7,7 @@
 /**
  * A `String` converter that converts characters to HTML entities.
  *
- * This is intended to sanitice text before inserting the text into an HTML
+ * This is intended to sanitize text before inserting the text into an HTML
  * document. Characters that are meaningful in HTML are converted to
  * HTML entities (like `&amp;` for `&`).
  *
@@ -134,7 +134,7 @@
 /**
  * Converter which escapes characters with special meaning in HTML.
  *
- * The converter finds characters that are siginificant in HTML source and
+ * The converter finds characters that are significant in HTML source and
  * replaces them with corresponding HTML entities.
  *
  * The characters that need escaping in HTML are:
diff --git a/sdk/lib/convert/line_splitter.dart b/sdk/lib/convert/line_splitter.dart
index 785ae8b..4e3778d 100644
--- a/sdk/lib/convert/line_splitter.dart
+++ b/sdk/lib/convert/line_splitter.dart
@@ -9,7 +9,7 @@
 const int _CR = 13;
 
 /**
- * A [StreamTranformer] that splits a [String] into individual lines.
+ * A [StreamTransformer] that splits a [String] into individual lines.
  *
  * A line is terminated by either a CR (U+000D), a LF (U+000A), a
  * CR+LF sequence (DOS line ending),
diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart
index 0687bb1..6b9fece 100644
--- a/sdk/lib/convert/utf.dart
+++ b/sdk/lib/convert/utf.dart
@@ -347,7 +347,7 @@
     StringBuffer buffer = new StringBuffer();
     _Utf8Decoder decoder = new _Utf8Decoder(buffer, _allowMalformed);
     decoder.convert(codeUnits, start, end);
-    decoder.close();
+    decoder.flush(codeUnits, end);
     return buffer.toString();
   }
 
@@ -431,11 +431,15 @@
    *
    * This method throws if the input was partial and the decoder was
    * constructed with `allowMalformed` set to `false`.
+   *
+   * The [source] and [offset] of the current position may be provided,
+   * and are included in the exception if one is thrown.
    */
-  void flush() {
+  void flush([List<int> source, int offset]) {
     if (hasPartialInput) {
       if (!_allowMalformed) {
-        throw new FormatException("Unfinished UTF-8 octet sequence");
+        throw new FormatException("Unfinished UTF-8 octet sequence",
+                                  source, offset);
       }
       _stringSink.writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
       _value = 0;
@@ -480,7 +484,8 @@
             expectedUnits = 0;
             if (!_allowMalformed) {
               throw new FormatException(
-                  "Bad UTF-8 encoding 0x${unit.toRadixString(16)}");
+                  "Bad UTF-8 encoding 0x${unit.toRadixString(16)}",
+                  codeUnits, i);
             }
             _isFirstCharacter = false;
             _stringSink.writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
@@ -496,7 +501,8 @@
           // encoding.
           if (!_allowMalformed) {
             throw new FormatException(
-                "Overlong encoding of 0x${value.toRadixString(16)}");
+                "Overlong encoding of 0x${value.toRadixString(16)}",
+                codeUnits, i - extraUnits - 1);
           }
           expectedUnits = extraUnits = 0;
           value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
@@ -504,7 +510,8 @@
         if (value > _FOUR_BYTE_LIMIT) {
           if (!_allowMalformed) {
             throw new FormatException("Character outside valid Unicode range: "
-                                      "0x${value.toRadixString(16)}");
+                                      "0x${value.toRadixString(16)}",
+                                      codeUnits, i - extraUnits - 1);
           }
           value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
         }
@@ -532,7 +539,8 @@
           // TODO(floitsch): should this be unit <= 0 ?
           if (!_allowMalformed) {
             throw new FormatException(
-                "Negative UTF-8 code unit: -0x${(-unit).toRadixString(16)}");
+                "Negative UTF-8 code unit: -0x${(-unit).toRadixString(16)}",
+                codeUnits, i - 1);
           }
           _stringSink.writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
         } else {
@@ -555,7 +563,8 @@
           }
           if (!_allowMalformed) {
             throw new FormatException(
-                "Bad UTF-8 encoding 0x${unit.toRadixString(16)}");
+                "Bad UTF-8 encoding 0x${unit.toRadixString(16)}",
+                codeUnits, i - 1);
           }
           value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
           expectedUnits = extraUnits = 0;
diff --git a/sdk/lib/core/annotations.dart b/sdk/lib/core/annotations.dart
index 6a596c6..77211ab 100644
--- a/sdk/lib/core/annotations.dart
+++ b/sdk/lib/core/annotations.dart
@@ -137,7 +137,7 @@
  * so assigning it to a typed variable may fail in checked mode,
  * and testing it with the `is` operator
  * will only return true for types it actually implements or extends.
- * Accessing a member which isn't implemented by the classs
+ * Accessing a member which isn't implemented by the class
  * will cause the `noSuchMethod` method to be called normally,
  * the `@proxy` annotation merely states the intent to handle (some of) those
  * `noSuchMethod` calls gracefully.
diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart
index 0453704..958dff2 100644
--- a/sdk/lib/core/date_time.dart
+++ b/sdk/lib/core/date_time.dart
@@ -34,7 +34,7 @@
  * For convenience and readability,
  * the DateTime class provides a constant for each day and month
  * name&mdash;for example, [AUGUST] and [FRIDAY].
- * You can use these constants to improve code readibility:
+ * You can use these constants to improve code readability:
  *
  *     DateTime berlinWallFell = new DateTime(1989, DateTime.NOVEMBER, 9);
  *     assert(berlinWallFell.weekday == DateTime.THURSDAY);
@@ -210,14 +210,15 @@
    *   then optionally a two digit minutes value,
    *   then optionally a two digit seconds value, and
    *   then optionally a '.' followed by a one-to-six digit second fraction.
-   *   The minuts and seconds may be separated from the previous parts by a ':'.
+   *   The minutes and seconds may be separated from the previous parts by a
+   *   ':'.
    *   Examples: "12", "12:30:24.124", "123010.50".
    * * An optional time-zone offset part,
    *   possibly separated from the previous by a space.
    *   The time zone is either 'z' or 'Z', or it is a signed two digit hour
    *   part and an optional two digit minute part. The sign must be either
    *   "+" or "-", and can not be omitted.
-   *   The minutes may be separted from the hours by a ':'.
+   *   The minutes may be separated from the hours by a ':'.
    *   Examples: "Z", "-10", "01:30", "1130".
    *
    * This includes the output of both [toString] and [toIso8601String], which
diff --git a/sdk/lib/core/expando.dart b/sdk/lib/core/expando.dart
index 2ecd2dc..1e8a47a 100644
--- a/sdk/lib/core/expando.dart
+++ b/sdk/lib/core/expando.dart
@@ -10,7 +10,7 @@
  * Does not work on numbers, strings, booleans or null.
  *
  * An `Expando` does not hold on to the added property value after an object
- * becomes inacessible.
+ * becomes inaccessible.
  *
  * Since you can always create a new number that is identical to an existing
  * number, it means that an expando property on a number could never be
diff --git a/sdk/lib/core/invocation.dart b/sdk/lib/core/invocation.dart
index 7deaeec..2741841 100644
--- a/sdk/lib/core/invocation.dart
+++ b/sdk/lib/core/invocation.dart
@@ -42,7 +42,7 @@
   /**
    * Whether the invocation was a setter call.
    *
-   * If so, [arguments] has exactly one positonal argument,
+   * If so, [arguments] has exactly one positional argument,
    * and [namedArguments] is empty.
    */
   bool get isSetter;
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 9dc6610..ca0a449 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -329,7 +329,7 @@
   void setAll(int index, Iterable<E> iterable);
 
   /**
-   * Removes the first occurence of [value] from this list.
+   * Removes the first occurrence of [value] from this list.
    *
    * Returns true if [value] was in the list, false otherwise.
    *
@@ -452,7 +452,7 @@
    * The [iterable] must have enough objects to fill the range from `start`
    * to `end` after skipping [skipCount] objects.
    *
-   * If `iterable` is this list, the operation will copies the elements
+   * If `iterable` is this list, the operation copies the elements
    * originally in the range from `skipCount` to `skipCount + (end - start)` to
    * the range `start` to `end`, even if the two ranges overlap.
    *
diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart
index 3d59c75..15b892d 100644
--- a/sdk/lib/core/num.dart
+++ b/sdk/lib/core/num.dart
@@ -61,7 +61,7 @@
    * Returns a negative number if `this` is less than `other`, zero if they are
    * equal, and a positive number if `this` is greater than `other`.
    *
-   * The orderding represented by this method is a total ordering of [num]
+   * The ordering represented by this method is a total ordering of [num]
    * values. All distinct doubles are non-equal, as are all distinct integers,
    * but integers are equal to doubles if they have the same numerical
    * value.
diff --git a/sdk/lib/core/pattern.dart b/sdk/lib/core/pattern.dart
index 7f32c72..aae9e64 100644
--- a/sdk/lib/core/pattern.dart
+++ b/sdk/lib/core/pattern.dart
@@ -9,7 +9,7 @@
  */
 abstract class Pattern {
   // NOTE: When using "start" index from the language library, call
-  // without an argument if start is zero. This allows backwards compatiblity
+  // without an argument if start is zero. This allows backwards compatibility
   // with implementations of the older interface that didn't have the start
   // index argument.
   /**
@@ -66,7 +66,7 @@
  *     my
  *     string
  *
- * Some patterns, regular expressions in particular, may record subtrings
+ * Some patterns, regular expressions in particular, may record substrings
  * that were part of the matching. These are called _groups_ in the Match
  * object. Some patterns may never have any groups, and their matches always
  * have zero [groupCount].
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index d2e9d8d..fe00311 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -21,7 +21,7 @@
  * or ordered in some way. Examples:
  *
  * * A [HashSet] is unordered, which means that its iteration order is
- *   uspecified,
+ *   unspecified,
  * * [LinkedHashSet] iterates in the insertion order of its elements, and
  * * a sorted set like [SplayTreeSet] iterates the elements in sorted order.
  *
diff --git a/sdk/lib/core/stacktrace.dart b/sdk/lib/core/stacktrace.dart
index 17abd38..e655072 100644
--- a/sdk/lib/core/stacktrace.dart
+++ b/sdk/lib/core/stacktrace.dart
@@ -46,7 +46,7 @@
    * Returns a [String] representation of the stack trace.
    *
    * The string represents the full stack trace starting from
-   * the point where a throw ocurred to the top of the current call sequence.
+   * the point where a throw occurred to the top of the current call sequence.
    *
    * The exact format of the string representation is not final.
    */
diff --git a/sdk/lib/core/stopwatch.dart b/sdk/lib/core/stopwatch.dart
index f6dd85e..cf55b89 100644
--- a/sdk/lib/core/stopwatch.dart
+++ b/sdk/lib/core/stopwatch.dart
@@ -15,7 +15,7 @@
 
   // The _start and _stop fields capture the time when [start] and [stop]
   // are called respectively.
-  // If _stop is null, the stopwatched is running.
+  // If _stop is null, the stopwatch is running.
   int _start = 0;
   int _stop = 0;
 
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 38df590..bd3a15e 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -413,7 +413,7 @@
   bool contains(Pattern other, [int startIndex = 0]);
 
   /**
-   * Returns a new string in which the first occurence of [from] in this string
+   * Returns a new string in which the first occurrence of [from] in this string
    * is replaced with [to], starting from [startIndex]:
    *
    *     '0.0001'.replaceFirst(new RegExp(r'0'), ''); // '.0001'
@@ -422,7 +422,7 @@
   String replaceFirst(Pattern from, String to, [int startIndex = 0]);
 
   /**
-   * Replace the first occurence of [from] in this string.
+   * Replace the first occurrence of [from] in this string.
    *
    * Returns a new string, which is this string
    * except that the first match of [pattern], starting from [startIndex],
diff --git a/sdk/lib/core/symbol.dart b/sdk/lib/core/symbol.dart
index 44e9787..fc39141 100644
--- a/sdk/lib/core/symbol.dart
+++ b/sdk/lib/core/symbol.dart
@@ -23,7 +23,7 @@
    *   (one of "`+`", "`-`", "`*`", "`/`", "`%`", "`~/`", "`&`", "`|`",
    *   "`^`", "`~`", "`<<`", "`>>`", "`<`", "`<=`", "`>`", "`>=`", "`==`",
    *   "`[]`", "`[]=`", or "`unary-`"),
-   * * any of the above preceeded by any number of qualifiers,
+   * * any of the above preceded by any number of qualifiers,
    *   where a qualifier is a non-private identifier followed by '`.`',
    * * or the empty string (the default name of a library with no library
    *   name declaration).
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
index 744bbe2..e9a716f 100644
--- a/sdk/lib/core/uri.dart
+++ b/sdk/lib/core/uri.dart
@@ -75,7 +75,7 @@
    * default port.
    *
    * If any of `userInfo`, `host` or `port` are provided,
-   * the URI has an autority according to [hasAuthority].
+   * the URI has an authority according to [hasAuthority].
    *
    * The path component is set through either [path] or
    * [pathSegments].
@@ -613,7 +613,7 @@
    * value from this `Uri` instead.
    *
    * This method is different from [Uri.resolve] which overrides in a
-   * hierarchial manner,
+   * hierarchical manner,
    * and can instead replace each part of a `Uri` individually.
    *
    * Example:
@@ -1060,7 +1060,7 @@
    *
    * Note that decoding a URI component might change its meaning as
    * some of the decoded characters could be characters with are
-   * delimiters for a given URI componene type. Always split a URI
+   * delimiters for a given URI component type. Always split a URI
    * component using the delimiters for the component before decoding
    * the individual parts.
    *
@@ -1361,7 +1361,7 @@
   final String _fragment;
 
   /**
-   * Cache the computed return value of [pathSegements].
+   * Cache the computed return value of [pathSegments].
    */
   List<String> _pathSegments;
 
@@ -2742,7 +2742,7 @@
    * If [plusToSpace] is `true`, plus characters will be converted to spaces.
    *
    * The decoder will create a byte-list of the percent-encoded parts, and then
-   * decode the byte-list using [encoding]. The default encodingis UTF-8.
+   * decode the byte-list using [encoding]. The default encodings UTF-8.
    */
   static String _uriDecode(String text,
                            int start,
diff --git a/sdk/lib/html/html_common/conversions.dart b/sdk/lib/html/html_common/conversions.dart
index 179b4e8..d66d9a0 100644
--- a/sdk/lib/html/html_common/conversions.dart
+++ b/sdk/lib/html/html_common/conversions.dart
@@ -223,7 +223,7 @@
 
     if (isJavaScriptSimpleObject(e)) {
       // TODO(sra): If mustCopy is false, swizzle the prototype for one of a Map
-      // implementation that uses the properies as storage.
+      // implementation that uses the properties as storage.
       var slot = findSlot(e);
       var copy = readSlot(slot);
       if (copy != null) return copy;
diff --git a/sdk/lib/internal/sort.dart b/sdk/lib/internal/sort.dart
index 40a7d09..4085000 100644
--- a/sdk/lib/internal/sort.dart
+++ b/sdk/lib/internal/sort.dart
@@ -107,7 +107,7 @@
     var pivot2 = el4;
 
     // el2 and el4 have been saved in the pivot variables. They will be written
-    // back, once the partioning is finished.
+    // back, once the partitioning is finished.
     a[index1] = el1;
     a[index3] = el3;
     a[index5] = el5;
@@ -121,7 +121,7 @@
     bool pivots_are_equal = (compare(pivot1, pivot2) == 0);
     if (pivots_are_equal) {
       var pivot = pivot1;
-      // Degenerated case where the partioning becomes a dutch national flag
+      // Degenerated case where the partitioning becomes a dutch national flag
       // problem.
       //
       // [ |  < pivot  | == pivot | unpartitioned | > pivot  | ]
diff --git a/sdk/lib/internal/symbol.dart b/sdk/lib/internal/symbol.dart
index 73e7023..85df9a7 100644
--- a/sdk/lib/internal/symbol.dart
+++ b/sdk/lib/internal/symbol.dart
@@ -45,7 +45,7 @@
    * Source of RegExp matching a declarable operator names.
    *
    * The operators that can be declared using `operator` declarations are
-   * also the only ones allowed as symbols. The name of the oeprators is
+   * also the only ones allowed as symbols. The name of the operators is
    * the same as the operator itself except for unary minus, where the name
    * is "unary-".
    */
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index 73668e9..cb9cdcc 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -114,7 +114,7 @@
  * data into the required format or to prepare it for output.
  *
  * You might want to use a stream to read large files,
- * to manipulate the data with tranformers,
+ * to manipulate the data with transformers,
  * or for compatibility with another API, such as [WebSocket]s.
  *
  *     import 'dart:io';
@@ -586,7 +586,7 @@
    * the bytes will be filled into [buffer] from at index [start], otherwise
    * index 0. If [end] is present, the [end] - [start] bytes will be read into
    * [buffer], otherwise up to [buffer.length]. If [end] == [start] nothing
-   * happends.
+   * happens.
    *
    * Returns a [:Future<int>:] that completes with the number of bytes read.
    */
@@ -597,7 +597,7 @@
    * is present, the bytes will be filled into [buffer] from at index [start],
    * otherwise index 0.  If [end] is present, the [end] - [start] bytes will be
    * read into [buffer], otherwise up to [buffer.length]. If [end] == [start]
-   * nothing happends.
+   * nothing happens.
    *
    * Throws a [FileSystemException] if the operation fails.
    */
diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart
index e0b22da..41bee01 100644
--- a/sdk/lib/io/file_system_entity.dart
+++ b/sdk/lib/io/file_system_entity.dart
@@ -816,7 +816,7 @@
  */
 class FileSystemMoveEvent extends FileSystemEvent {
   /**
-   * If the underlaying implementation is able to identify the destination of
+   * If the underlying implementation is able to identify the destination of
    * the moved file, [destination] will be set. Otherwise, it will be `null`.
    */
   final String destination;
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 71eff21..3a7b47d 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -1174,7 +1174,7 @@
    * specified using the [status] argument.
    *
    * This method will also call `close`, and the returned future is
-   * the furure returned by `close`.
+   * the future returned by `close`.
    */
   Future redirect(Uri location, {int status: HttpStatus.MOVED_TEMPORARILY});
 
@@ -1729,7 +1729,7 @@
    * [:HttpStatus.MOVED_TEMPORARILY:] (302, alias for
    * [:HttpStatus.FOUND:]), [:HttpStatus.SEE_OTHER:] (303) and
    * [:HttpStatus.TEMPORARY_REDIRECT:] (307). For
-   * [:HttpStatus.SEE_OTHER:] (303) autmatic redirect will also happen
+   * [:HttpStatus.SEE_OTHER:] (303) automatic redirect will also happen
    * for "POST" requests with the method changed to "GET" when
    * following the redirect.
    *
diff --git a/sdk/lib/io/io_resource_info.dart b/sdk/lib/io/io_resource_info.dart
index 317cf13..3fb6dc9 100644
--- a/sdk/lib/io/io_resource_info.dart
+++ b/sdk/lib/io/io_resource_info.dart
@@ -51,9 +51,9 @@
     lastRead = _IOResourceInfo.timestamp;
   }
 
-  // In cases where we read but did not neccesarily get any bytes, use this to
+  // In cases where we read but did not necessarily get any bytes, use this to
   // update the readCount and timestamp. Manually update totalRead if any bytes
-  // where acutally read.
+  // where actually read.
   void didRead() { addRead(0); }
 
   void addWrite(int bytes) {
diff --git a/sdk/lib/io/platform_impl.dart b/sdk/lib/io/platform_impl.dart
index 8b83fc0..5743b9e 100644
--- a/sdk/lib/io/platform_impl.dart
+++ b/sdk/lib/io/platform_impl.dart
@@ -22,7 +22,7 @@
    * a non-empty name and a value separated by a '=' character.
    * The name does not contain a '=' character,
    * so the name is everything up to the first '=' character.
-   * Values are everything after the first '=' charcacter.
+   * Values are everything after the first '=' character.
    * A value may contain further '=' characters, and it may be empty.
    *
    * Returns an [OSError] if retrieving the environment fails.
@@ -38,7 +38,7 @@
   static String packageRoot = _packageRoot();
   static String packageConfig = _packageConfig();
 
-  // Cache the OS environemnt. This can be an OSError instance if
+  // Cache the OS environment. This can be an OSError instance if
   // retrieving the environment failed.
   static var/*OSError|Map<String,String>*/ _environmentCache;
 
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index 35560a9..2a87848 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -51,7 +51,7 @@
    *
    * If end-of-file is reached after any bytes have been read from stdin,
    * that data is returned.
-   * Returns `null` if no bytes preceeded the end of input.
+   * Returns `null` if no bytes preceded the end of input.
    */
   String readLineSync({Encoding encoding: SYSTEM_ENCODING,
                        bool retainNewlines: false}) {
@@ -86,7 +86,7 @@
         line.add(byte);
       }
     } else {
-      // Case having to hande CR LF as a single unretained line terminator.
+      // Case having to handel CR LF as a single unretained line terminator.
       outer: while (true) {
         int byte = readByteSync();
         if (byte == LF) break;
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 5e3fe7f..b398e53 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -80,7 +80,7 @@
    * through the control port.
    *
    * Some control messages require a specific capability to be passed along
-   * with the message (see [pauseCapability] and [terminateCapaibility]),
+   * with the message (see [pauseCapability] and [terminateCapability]),
    * otherwise the message is ignored by the isolate.
    */
   final SendPort controlPort;
diff --git a/sdk/lib/math/rectangle.dart b/sdk/lib/math/rectangle.dart
index 2145cc7..66a2fc3 100644
--- a/sdk/lib/math/rectangle.dart
+++ b/sdk/lib/math/rectangle.dart
@@ -15,7 +15,7 @@
  *
  * The rectangle is the set of points with representable coordinates greater
  * than or equal to left/top, and with distance to left/top no greater than
- * width/height (to the limit of the precission of the coordinates).
+ * width/height (to the limit of the precision of the coordinates).
  */
 abstract class _RectangleBase<T extends num> {
   const _RectangleBase();
diff --git a/tests/co19/co19-analyzer2.status b/tests/co19/co19-analyzer2.status
index d5f3e37..618fb0e 100644
--- a/tests/co19/co19-analyzer2.status
+++ b/tests/co19/co19-analyzer2.status
@@ -4,21 +4,12 @@
 
 [ $compiler == dart2analyzer ]
 
-Language/Functions/Formal_Parameters/syntax_t05: StaticWarning # Issue 26644
 Language/Classes/Classes/method_definition_t06: MissingStaticWarning # Please triage this failure.
 Language/Classes/Getters/static_getter_t02: CompileTimeError # Issue 24534
 Language/Classes/Getters/static_t01: StaticWarning # Please triage this failure.
 Language/Classes/Getters/type_object_t01: StaticWarning # Please triage this failure.
 Language/Classes/Getters/type_object_t02: StaticWarning # Please triage this failure.
 Language/Classes/Instance_Variables/definition_t03: StaticWarning # Please triage this failure.
-Language/Classes/Setters/name_t08: CompileTimeError # Issue 23777
-Language/Classes/Setters/name_t09: CompileTimeError # Issue 23777
-Language/Classes/Setters/name_t10: CompileTimeError # Issue 23777
-Language/Classes/Setters/name_t11: CompileTimeError # Issue 23777
-Language/Classes/Setters/name_t12: CompileTimeError # Issue 23777
-Language/Classes/Setters/name_t13: CompileTimeError # Issue 23777
-Language/Classes/Setters/name_t14: CompileTimeError # Issue 23777
-Language/Classes/Setters/name_t15: CompileTimeError # Issue 23777
 Language/Classes/Setters/type_object_t01: StaticWarning # Please triage this failure.
 Language/Classes/Setters/type_object_t02: StaticWarning # Please triage this failure.
 Language/Classes/Static_Methods/same_name_method_and_setter_t01: MissingStaticWarning # Please triage this failure.
@@ -76,83 +67,6 @@
 Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t03: StaticWarning # Please triage this failure.
 Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t04: StaticWarning # Please triage this failure.
 Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t05: StaticWarning # Please triage this failure.
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t03: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/named_parameters_t01: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/positional_parameters_t01: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t03: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t03: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t04: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t05: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t06: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t07: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t08: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t09: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t03: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t04: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t05: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t06: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t07: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t03: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t04: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t05: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t06: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t07: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t08: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t03: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t04: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t05: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t06: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t07: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t08: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t09: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t03: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t04: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t05: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t06: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t07: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/General_Super_Property_Extraction: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t04: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t05: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/expression_evaluation_t07: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/no_such_method_t01: StaticWarning # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/proxy_annotation_t05: StaticWarning # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/proxy_annotation_t06: StaticWarning # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/proxy_annotation_t07: StaticWarning # Please triage this failure.
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/proxy_annotation_t08: StaticWarning # Please triage this failure.
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t02: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/named_parameters_t01: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/positional_parameters_t01: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t02: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t03: CompileTimeError # Please triage this failure.
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization: CompileTimeError # Issue 23777
-Language/Expressions/Property_Extraction/Super_Closurization: CompileTimeError # Issue 23777
 Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/inheritance_t03: StaticWarning # Please triage this failure.
 Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t01: CompileTimeError # Please triage this failure.
 Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t02: CompileTimeError # Please triage this failure.
@@ -183,8 +97,8 @@
 Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Issue 24767
 Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Issue 24767
 Language/Statements/Assert/syntax_t04: MissingCompileTimeError # Assert messages are enabled by default
-Language/Statements/Assert/type_t04: MissingStaticWarning
-Language/Statements/Switch/last_statement_t03: MissingStaticWarning
+Language/Statements/Assert/type_t04: MissingStaticWarning # Please triage this failure
+Language/Statements/Switch/last_statement_t03: MissingStaticWarning # Please triage this failure
 Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t01: MissingCompileTimeError # Issue 25495
 Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t03: MissingCompileTimeError # Issue 25495
 Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t05: MissingCompileTimeError # Issue 25495
diff --git a/tests/co19/co19-co19.status b/tests/co19/co19-co19.status
index 3c1d647..8a8254d 100644
--- a/tests/co19/co19-co19.status
+++ b/tests/co19/co19-co19.status
@@ -68,8 +68,3 @@
 
 [ $runtime == dartium || $compiler == dart2js ]
 LibTest/async/Future/Future.delayed_A01_t02: Pass, Fail # Issue 15524
-
-[ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && ($runtime == vm || $runtime == drt || $runtime == dart_precompiled) ]
-# Optional trailing commas for argument and parameter lists added to language.
-# https://github.com/dart-lang/co19/issues/68
-Language/Functions/Formal_Parameters/syntax_t05: Fail, OK
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 8a461b2..491c274 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -3,7 +3,6 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == dart2js ]
-Language/Functions/Formal_Parameters/syntax_t05: RuntimeError # Issue 26644
 
 Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError # compiler cancelled: cannot resolve type T
 Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError, OK # co19 issue 258
@@ -17,14 +16,6 @@
 Language/Classes/Setters/name_t02: CompileTimeError # Issue 5023
 Language/Classes/Setters/name_t03: RuntimeError # Issue 5023
 Language/Classes/Setters/name_t07: CompileTimeError # Issue 5023
-Language/Classes/Setters/name_t08: CompileTimeError # Please triage this failure
-Language/Classes/Setters/name_t09: CompileTimeError # Please triage this failure
-Language/Classes/Setters/name_t10: CompileTimeError # Please triage this failure
-Language/Classes/Setters/name_t11: CompileTimeError # Please triage this failure
-Language/Classes/Setters/name_t12: CompileTimeError # Please triage this failure
-Language/Classes/Setters/name_t13: CompileTimeError # Please triage this failure
-Language/Classes/Setters/name_t14: CompileTimeError # Please triage this failure
-Language/Classes/Setters/name_t15: CompileTimeError # Please triage this failure
 Language/Classes/Setters/static_setter_t06: RuntimeError  # Please triage this failure
 Language/Classes/Setters/type_object_t01: RuntimeError # Please triage this failure
 Language/Classes/Setters/type_object_t02: RuntimeError # Please triage this failure
@@ -89,146 +80,6 @@
 Language/Expressions/Object_Identity/double_t02: RuntimeError # Please triage this failure
 Language/Expressions/Object_Identity/double_t03: RuntimeError # Please triage this failure
 Language/Expressions/Object_Identity/object_t02: RuntimeError # Issue 1533 (int/double related)
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: CompileTimeError # Issue 24607
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: CompileTimeError # Issue 24607
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/named_parameters_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/positional_parameters_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/deferred_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t08: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t09: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t08: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t08: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t09: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Super_Property_Extraction: CompileTimeError # Issue 26287
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t04: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t05: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/expression_evaluation_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/no_such_method_t01: RuntimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/named_parameters_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/positional_parameters_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t08: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_access_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_assignment_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t08: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t09: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t10: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t11: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t12: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t13: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t14: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t15: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t16: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t17: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_unary_bitwise_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t01: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t03: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t04: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t05: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t06: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t07: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t08: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Super_Closurization: CompileTimeError # Issue 26287
-Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t01: RuntimeError # Please triage this failure
 Language/Expressions/Shift/syntax_t01/14: MissingRuntimeError # Please triage this failure
 Language/Functions/External_Functions/not_connected_to_a_body_t01: CompileTimeError, OK # Issue 5021
 Language/Generics/syntax_t17: fail # Issue 21203
@@ -472,11 +323,11 @@
 Language/Expressions/Function_Expressions/static_type_form_3_syncs_t03: RuntimeError # Please triage this failure
 Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError # Please triage this failure
 Language/Expressions/If_null_Expressions/static_type_t02: RuntimeError # Please triage this failure
-Language/Expressions/Property_Extraction/General_Super_Property_Extraction/getter_lookup_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Property_Extraction/Super_Closurization/setter_closurization_t09: Timeout, Skip  # Please triage this failure
 Language/Functions/async_return_type_t01: RuntimeError # Please triage this failure
 Language/Functions/generator_return_type_t01: RuntimeError # Please triage this failure
 Language/Functions/generator_return_type_t02: RuntimeError # Please triage this failure
+Language/Statements/Assert/execution_t03: RuntimeError # Please triage this failure
+Language/Statements/Assert/execution_t11: RuntimeError # Please triage this failure
 Language/Statements/Switch/execution_t01: Fail # Missing type check in switch expression
 Language/Statements/Switch/type_t01: RuntimeError # Issue 16089
 Language/Statements/Return/runtime_type_t04: RuntimeError # Issue 26584
@@ -484,11 +335,14 @@
 Language/Types/Dynamic_Type_System/malbounded_type_error_t01: RuntimeError # Issue 21088
 Language/Types/Parameterized_Types/malbounded_t06: RuntimeError # Issue 21088
 LibTest/collection/DoubleLinkedQueue/DoubleLinkedQueue_class_A01_t01: Skip # Timesout. Please triage this failure.
-LibTest/core/Map/Map_class_A01_t04: Slow, Pass
-LibTest/core/Uri/Uri_A06_t03: Slow, Pass
+LibTest/core/Map/Map_class_A01_t04: Slow, Pass # Please triage this failure
+LibTest/core/Uri/Uri_A06_t03: Slow, Pass # Please triage this failure
 LibTest/math/Point/operator_mult_A02_t01: RuntimeError # Issue 1533
 
+
 [ $compiler == dart2js && $checked && $runtime != d8]
+LayoutTests/fast/canvas/webgl/framebuffer-object-attachment_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/webgl/read-pixels-test_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/inline/empty-inline-before-collapsed-space_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/parser/pre-first-line-break_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/url/trivial_t01: RuntimeError # Please triage this failure
@@ -667,10 +521,6 @@
 WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: Fail # please triage
 WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-007_t01: Fail # please triage
 
-[ $compiler == dart2js && $checked != true ]
-Language/Expressions/Property_Extraction/General_Super_Property_Extraction/getter_lookup_t02: Timeout, Skip # Please triage this failure
-Language/Expressions/Property_Extraction/Super_Closurization/setter_closurization_t09: CompileTimeError # Please triage this failure
-
 [ $compiler == dart2js && $checked != true && $runtime != d8 && $runtime != jsshell]
 LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError # Please triage this failure
 
@@ -1327,7 +1177,9 @@
 LayoutTests/fast/filesystem/async-operations_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/filesystem/filesystem-reference_t01: Pass, RuntimeError # Please triage this failure
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
 LayoutTests/fast/forms/ValidityState-tooLong-input_t01: RuntimeError # https://github.com/dart-lang/co19/issues/48
 LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError # https://github.com/dart-lang/co19/issues/48
 LayoutTests/fast/forms/autofocus-focus-only-once_t01: Skip # Times out. Please triage this failure
@@ -1872,6 +1724,7 @@
 WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-row-context_t01: RuntimeError # Please triage this failure
 WebPlatformTest/html/dom/elements/global-attributes/dataset-enumeration_t01: RuntimeError # Please triage this failure
 WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: RuntimeError # Please triage this failure
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError # Please triage this failure
 WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-001_t01: RuntimeError # Please triage this failure
 
 [ $compiler == dart2js && $runtime == chrome && $system == macos ]
@@ -2295,6 +2148,7 @@
 LayoutTests/fast/files/xhr-response-blob_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/autofocus-focus-only-once_t01: Skip # Times out.
 LayoutTests/fast/forms/date/input-valueasdate-date_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError # Please triage this failure
@@ -2834,12 +2688,12 @@
 LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError # Issue 27872
+LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/context-destroyed-crash_t01: Pass, RuntimeError # Issue 26898
 LayoutTests/fast/canvas/webgl/context-lost-restored_t01: Pass, RuntimeError # Issue 26898
 LayoutTests/fast/canvas/webgl/context-lost_t01: Pass, RuntimeError # Issue 26898
-LayoutTests/fast/canvas/webgl/gl-enum-tests_t01: RuntimeError # Issue 27872
+LayoutTests/fast/canvas/webgl/gl-enum-tests_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/renderer-and-vendor-strings_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: Skip # Times out.
@@ -3226,12 +3080,12 @@
 LayoutTests/fast/dom/click-method-on-html-element_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/client-width-height-quirks_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/containerNode_t01: Skip # Times out. Please triage this failure
-LayoutTests/fast/dom/createElementNS-namespace-errors_t01: RuntimeError # Issue 27873
 LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/css-rule-functions_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/css-selectorText_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/css-shortHands_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/createElementNS-namespace-errors_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/custom/constructor-calls-created-synchronously_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError # Please triage this failure
@@ -4132,15 +3986,12 @@
 
 [ $compiler == dart2js && $runtime == ff && $system == macos]
 LayoutTests/fast/canvas/canvas-modify-emptyPath_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/innerHTML/005_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/html/draggable_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/ruby/modify-positioned-ruby-text-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/table/margins-perpendicular-containing-block_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/table/table-rowspan-cell-with-empty-cell_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/text-autosizing/vertical-writing-mode_t01: RuntimeError # Please triage this failure
-LibTest/core/RegExp/Pattern_semantics/firstMatch_Atom_A03_t03: RuntimeError # Please triage this failure
 
 [ $compiler == dart2js && $runtime == ff && $checked]
 LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError # Please triage this failure
@@ -6734,7 +6585,7 @@
 LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-clip-rule_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-composite-canvas_t01: Pass, RuntimeError # Please triage this failure
+LayoutTests/fast/canvas/canvas-composite-canvas_t01: Pass, RuntimeError, Timeout # Please triage this failure
 LayoutTests/fast/canvas/canvas-composite-image_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-currentColor_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-currentTransform_t01: RuntimeError # Feature is not implemented
diff --git a/tests/co19/co19-dartium.status b/tests/co19/co19-dartium.status
index b95e05b..76d0c26 100644
--- a/tests/co19/co19-dartium.status
+++ b/tests/co19/co19-dartium.status
@@ -2,147 +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.
 
-###########################################################################
-# Tests that use the name#field tear offs syntax which has been deprecated.
-###########################################################################
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t12: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_assignment_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t02: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t04: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t17: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t04: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t08: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t07: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t03: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t03: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t07: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t08: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t06: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t06: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t05: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t02: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t08: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t13: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t03: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t04: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t10: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_access_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t05: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t07: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t16: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_unary_bitwise_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t14: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t11: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t02: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t05: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t06: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t01: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t02: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t02: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t03: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t15: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t09: RuntimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t02: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/positional_parameters_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t03: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/named_parameters_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t04: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t03: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t03: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/positional_parameters_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t02: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t02: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t02: RuntimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/named_parameters_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t03: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t02: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/deferred_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t03: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t01: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t03: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t02: RuntimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t01: RuntimeError
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/expression_evaluation_t07: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t05: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t01: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t09: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t07: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t06: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t03: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t08: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t04: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t09: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t06: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t04: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t02: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t01: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t03: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t07: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t02: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t02: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t08: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t05: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t07: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t04: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t05: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t05: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t07: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t06: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t03: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t06: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t03: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t07: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t02: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t04: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t05: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t08: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t01: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t04: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t02: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t06: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t02: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t01: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t01: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t01: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t03: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t03: RuntimeError
-Language/Classes/Setters/name_t12: RuntimeError
-Language/Classes/Setters/name_t08: RuntimeError
-Language/Classes/Setters/name_t14: RuntimeError
-Language/Classes/Setters/name_t13: RuntimeError
-Language/Classes/Setters/name_t11: RuntimeError
-Language/Classes/Setters/name_t09: RuntimeError
-Language/Classes/Setters/name_t15: RuntimeError
-Language/Classes/Setters/name_t10: RuntimeError
-###########################################################################
-
 [ $compiler == none && $runtime == drt ]
 *: Skip # running co19 tests on content_shell would make our dartium cycle-times very long
 
@@ -210,13 +69,7 @@
 Language/Expressions/Identifier_Reference/built_in_not_dynamic_t19: Fail # Issue 25772
 Language/Expressions/Instance_Creation/New/execution_t04: Fail, OK
 Language/Expressions/Instance_Creation/New/execution_t06: Fail, OK
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: RuntimeError # Issue 24607
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: RuntimeError # Issue 24607
-Language/Expressions/Property_Extraction/General_Super_Property_Extraction: RuntimeError # Issue 26287
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: RuntimeError # Issue 24607
-Language/Expressions/Property_Extraction/Super_Closurization: RuntimeError # Issue 26287
 Language/Expressions/Spawning_an_Isolate/new_isolate_t01: RuntimeError, OK  # Uses Isolate.spawn.
-Language/Functions/Formal_Parameters/syntax_t05: RuntimeError # Issue 26644
 Language/Libraries_and_Scripts/Exports/reexport_t01: fail # Dart issue 12916
 Language/Libraries_and_Scripts/Exports/reexport_t02: fail # Dart issue 12916
 Language/Libraries_and_Scripts/Parts/compilation_t02: Skip # Please triage this failure.
@@ -1356,13 +1209,11 @@
 WebPlatformTest/custom-elements/concepts/type_A07_t01: Skip # Timing out on the bots. Please triage this failure.
 
 [ $compiler == none && $runtime == dartium && $system == windows ]
+LayoutTests/fast/css/MarqueeLayoutTest_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: Pass, RuntimeError # Issue 21605
 WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: Skip # Timesout Issue 26134
 WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01: Skip # Timesout sporadically
 WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-003_t01: Skip # Timesout sporadically
-LayoutTests/fast/css/MarqueeLayoutTest_t01: Pass, RuntimeError # Please triage this failure
-LayoutTests/fast/dom/shadow/shadowhost-keyframes_t01: RuntimeError, Pass # Please triage this failure.
-LayoutTests/fast/dom/shadow/shadowroot-keyframes_t01: RuntimeError, Pass # Please triage this failure.
 
 [ $compiler == none && $runtime == dartium && $system != windows ]
 LayoutTests/fast/css/font-face-unicode-range-monospace_t01: RuntimeError # co19-roll r761: Please triage this failure.
@@ -1401,8 +1252,6 @@
 WebPlatformTest/html/semantics/forms/the-datalist-element/datalistoptions_t01: Skip # Issue 20540.
 
 [ $compiler == none && $runtime == dartium && $checked ]
-LayoutTests/fast/parser/pre-first-line-break_t01: RuntimeError # co19-roll r801: Please triage this failure.
-LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError # co19-roll r761: Please triage this failure.
 Language/Errors_and_Warnings/static_warning_t02: RuntimeError # Please triage this failure.
 Language/Errors_and_Warnings/static_warning_t03: RuntimeError # Please triage this failure.
 Language/Errors_and_Warnings/static_warning_t04: RuntimeError # Please triage this failure.
@@ -1452,6 +1301,7 @@
 LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/multicol/vertical-lr/image-inside-nested-blocks-with-border_t01: RuntimeError # co19-roll r801: Please triage this failure.
+LayoutTests/fast/parser/pre-first-line-break_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor_t01: Pass, RuntimeError # co19-roll r801: Please triage this failure.
@@ -1460,8 +1310,8 @@
 LayoutTests/fast/shapes/parsing/parsing-shape-image-threshold_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError # co19-roll r801: Please triage this failure.
 LayoutTests/fast/table/absolute-table-percent-lengths_t01: RuntimeError # co19-roll r786: Please triage this failure.
-LayoutTests/fast/table/css-table-width_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/table/css-table-width-with-border-padding_t01: RuntimeError # Please triage this failure.
+LayoutTests/fast/table/css-table-width_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/table/fixed-table-layout-width-change_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/table/html-table-width-max-width-constrained_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/table/margins-flipped-text-direction_t01: RuntimeError # co19-roll r786: Please triage this failure.
@@ -1477,6 +1327,7 @@
 LayoutTests/fast/url/trivial-segments_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/url/trivial_t01: RuntimeError # co19-roll r786: Please triage this failure.
 LayoutTests/fast/writing-mode/auto-sizing-orthogonal-flows_t01: RuntimeError # Please triage this failure.
+LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LayoutTests/fast/xpath/xpath-result-eventlistener-crash_t01: RuntimeError # co19-roll r761: Please triage this failure.
 LibTest/html/Node/ownerDocument_A01_t01: RuntimeError # co19-roll r722: Issue 18251
 WebPlatformTest/DOMEvents/approved/Propagation.path.target.removed_t01: RuntimeError # co19-roll r738: Please triage this failure.
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status
index 55f7dcc..894669a 100644
--- a/tests/co19/co19-kernel.status
+++ b/tests/co19/co19-kernel.status
@@ -36,12 +36,6 @@
 ###############################################################################
 
 [ $compiler == dartk || $compiler == dartkp ]
-Language/Classes/Constructors/Generative_Constructors/formal_parameter_t01: DartkCrash
-Language/Classes/Constructors/Generative_Constructors/formal_parameter_t03: DartkCrash
-Language/Classes/Constructors/Generative_Constructors/formal_parameter_t04: DartkCrash
-Language/Classes/Constructors/Generative_Constructors/formal_parameter_t05: DartkCrash
-Language/Classes/Constructors/Generative_Constructors/formal_parameter_t06: DartkCrash
-Language/Classes/Constructors/Generative_Constructors/initializing_this_t02: DartkCrash
 Language/Classes/Getters/static_getter_t02: DartkCompileTimeError
 Language/Enums/syntax_t08: MissingCompileTimeError
 Language/Enums/syntax_t09: MissingCompileTimeError
@@ -68,8 +62,6 @@
 Language/Libraries_and_Scripts/Exports/syntax_t05: MissingCompileTimeError
 Language/Libraries_and_Scripts/Exports/syntax_t06: MissingCompileTimeError
 Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: DartkCompileTimeError
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: DartkCrash
-Language/Libraries_and_Scripts/Scripts/top_level_main_t02: DartkCrash
 Language/Libraries_and_Scripts/definition_syntax_t01: MissingCompileTimeError
 Language/Libraries_and_Scripts/definition_syntax_t03: MissingCompileTimeError
 Language/Libraries_and_Scripts/definition_syntax_t04: MissingCompileTimeError
@@ -91,6 +83,7 @@
 Language/Libraries_and_Scripts/definition_syntax_t26: MissingCompileTimeError
 Language/Libraries_and_Scripts/definition_syntax_t27: MissingCompileTimeError
 Language/Libraries_and_Scripts/definition_syntax_t29: MissingCompileTimeError
+Language/Libraries_and_Scripts/Scripts/top_level_main_t05: RuntimeError # 'main' getter not supported
 Language/Libraries_and_Scripts/top_level_syntax_t02: MissingCompileTimeError
 Language/Libraries_and_Scripts/top_level_syntax_t03: MissingCompileTimeError
 Language/Libraries_and_Scripts/top_level_syntax_t04: MissingCompileTimeError
@@ -120,14 +113,14 @@
 Language/Variables/final_t05: MissingCompileTimeError
 Language/Variables/final_t06: MissingCompileTimeError
 Language/Variables/final_t07: MissingCompileTimeError
+Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError # Missing compile-time error from analyzer
+Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError
 
 # dartk: JIT failures
 [ $compiler == dartk && $runtime == vm ]
 Language/Expressions/Constants/exception_t01: MissingCompileTimeError
 Language/Expressions/Constants/exception_t02: MissingCompileTimeError
 Language/Expressions/Identifier_Reference/evaluation_type_parameter_t02: MissingCompileTimeError
-Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError
-Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError
 Language/Mixins/Mixin_Application/syntax_t16: DartkCrash
 
 # dartk: precompilation failures
@@ -158,15 +151,8 @@
 Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t05: RuntimeError
 Language/Expressions/Method_Invocation/Ordinary_Invocation/evaluation_t07: RuntimeError
 Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t18: RuntimeError
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t01: Pass
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t02: Pass
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t03: Pass
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t04: Pass
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t05: Pass
-Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t06: Pass
 Language/Expressions/Type_Test/evaluation_t10: RuntimeError
 Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError
-Language/Functions/Formal_Parameters/syntax_t05: RuntimeError
 Language/Libraries_and_Scripts/Exports/invalid_uri_t02: Pass
 Language/Libraries_and_Scripts/Imports/deferred_import_t01: RuntimeError
 Language/Libraries_and_Scripts/Imports/deferred_import_t02: RuntimeError
@@ -198,7 +184,6 @@
 
 # dartk: JIT failures (debug)
 [ $compiler == dartk && $runtime == vm && $mode == debug ]
-Language/Libraries_and_Scripts/Scripts/top_level_main_t05: Crash  # !main_obj.IsNull()
 
 # dartk: precompilation failures
 [ $compiler == dartkp && $runtime == dart_precompiled ]
@@ -206,5 +191,4 @@
 Language/Expressions/Constants/exception_t02: Crash
 
 # dartk: precompilation failures (debug)
-[ $compiler == dartkp && $runtime == dart_precompiled && $mode == debug ]
-Language/Libraries_and_Scripts/Scripts/top_level_main_t05: Crash  # !main_obj.IsNull()
+[ $compiler == dartkp && $runtime == dart_precompiled && $mode == debug ]
\ No newline at end of file
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index 3e380ff..05b9fe2 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -2,147 +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.
 
-###########################################################################
-# Tests that use the name#field tear offs syntax which has been deprecated.
-###########################################################################
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t12: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_assignment_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t04: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t17: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t04: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t08: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t07: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t07: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t08: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t06: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t06: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t05: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t08: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t13: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t04: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t10: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_access_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t05: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t07: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t16: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_unary_bitwise_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t14: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t11: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t05: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t06: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t15: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t09: CompileTimeError
-Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/positional_parameters_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/named_parameters_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t04: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/positional_parameters_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/named_parameters_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/deferred_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t03: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t02: CompileTimeError
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t01: CompileTimeError
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/expression_evaluation_t07: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t05: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t01: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t09: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t07: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t06: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t03: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t08: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t04: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t09: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t06: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t04: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t02: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t01: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t03: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t07: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t02: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t02: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t08: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t05: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t07: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t04: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t05: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t05: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t07: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t06: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t03: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t06: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t03: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t07: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t02: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t04: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t05: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t08: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t01: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t04: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/static_type_t02: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t06: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t02: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t01: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t01: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t01: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t03: CompileTimeError
-Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t03: CompileTimeError
-Language/Classes/Setters/name_t12: CompileTimeError
-Language/Classes/Setters/name_t08: CompileTimeError
-Language/Classes/Setters/name_t14: CompileTimeError
-Language/Classes/Setters/name_t13: CompileTimeError
-Language/Classes/Setters/name_t11: CompileTimeError
-Language/Classes/Setters/name_t09: CompileTimeError
-Language/Classes/Setters/name_t15: CompileTimeError
-Language/Classes/Setters/name_t10: CompileTimeError
-###########################################################################
-
 [ $runtime == vm || $runtime == dart_precompiled ]
 
 # Failures ok in tests below. VM moves super initializer to end of list.
@@ -231,14 +90,6 @@
 Language/Classes/Setters/type_object_t02: RuntimeError # Issue 23721
 Language/Classes/Static_Methods/type_object_t01: RuntimeError # Issue 23721
 Language/Classes/Static_Methods/type_object_t02: RuntimeError # Issue 23721
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError # Issue 24472
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError # Issue 24472
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError # Issue 24472
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t04: MissingCompileTimeError # Issue 24472
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t05: MissingCompileTimeError # Issue 24472
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError # Issue 24472
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Issue 24472
-Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Issue 24472
 Language/Expressions/Identifier_Reference/built_in_identifier_t35: MissingCompileTimeError # Issue 25732
 Language/Expressions/Identifier_Reference/built_in_identifier_t36: MissingCompileTimeError # Issue 25732
 Language/Expressions/Identifier_Reference/built_in_identifier_t37: MissingCompileTimeError # Issue 25732
@@ -262,13 +113,9 @@
 Language/Expressions/Identifier_Reference/built_in_not_dynamic_t19: MissingCompileTimeError # Issue 25772
 Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t01: MissingCompileTimeError # Issue 25496
 Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t02: MissingCompileTimeError # Issue 25496
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: RuntimeError # Issue 24607
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: RuntimeError # Issue 24607
-Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: RuntimeError # Issue 24607
 Language/Expressions/Assignment/super_assignment_failed_t05: RuntimeError # Issue 25671
 Language/Expressions/Function_Invocation/async_generator_invokation_t08: Fail # Issue 25967
 Language/Expressions/Function_Invocation/async_generator_invokation_t10: Fail # Issue 25967
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: RuntimeError # Issue 24607
 Language/Mixins/Mixin_Application/syntax_t16: CompileTimeError # Issue 25765
 Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Issue 24767
 Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Issue 24767
@@ -280,9 +127,6 @@
 Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t03: MissingCompileTimeError # Issue 25495
 Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t05: MissingCompileTimeError # Issue 25495
 
-Language/Expressions/Property_Extraction/General_Super_Property_Extraction: CompileTimeError # Issue 26287
-Language/Expressions/Property_Extraction/Super_Closurization: CompileTimeError # Issue 26287
-
 [ $runtime == dart_precompiled || $mode == product ]
 Language/Metadata/*: SkipByDesign # Uses dart:mirrors
 Language/Expressions/Null/instance_of_class_null_t01: Skip # Uses dart:mirrors
@@ -334,8 +178,6 @@
 Language/Expressions/Instance_Creation/Const/deferred_type_t02: Skip # Requires deferred libraries
 Language/Expressions/Instance_Creation/New/evaluation_t19: Skip # Requires deferred libraries
 Language/Expressions/Instance_Creation/New/evaluation_t20: Skip # Requires deferred libraries
-Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/deferred_type_t01: Skip # Requires deferred libraries
-Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: Skip # Requires deferred libraries
 Language/Expressions/Type_Cast/evaluation_t10: Skip # Requires deferred libraries
 Language/Expressions/Type_Test/evaluation_t10: Skip # Requires deferred libraries
 Language/Libraries_and_Scripts/Imports/deferred_import_t01: Skip # Requires deferred libraries
diff --git a/tests/compiler/dart2js/annotated_code_helper.dart b/tests/compiler/dart2js/annotated_code_helper.dart
new file mode 100644
index 0000000..4d6f8ec
--- /dev/null
+++ b/tests/compiler/dart2js/annotated_code_helper.dart
@@ -0,0 +1,100 @@
+// 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.
+
+const int _LF = 0x0A;
+const int _CR = 0x0D;
+const int _LBRACE = 0x7B;
+
+class Annotation {
+  /// 1-based line number of the annotation.
+  final int lineNo;
+
+  /// 1-based column number of the annotation.
+  final int columnNo;
+
+  /// 0-based character offset  of the annotation within the source text.
+  final int offset;
+
+  /// The text in the annotation.
+  final String text;
+
+  Annotation(this.lineNo, this.columnNo, this.offset, this.text);
+}
+
+/// A source code text with annotated positions.
+///
+/// An [AnnotatedCode] can be created from a [String] of source code where
+/// annotated positions are embedded using the syntax `@{text}`. For instance
+///
+///     main() {
+///       @{foo-call}foo();
+///       bar@{bar-args}();
+///     }
+///
+///  the position of `foo` call will hold an annotation with text 'foo-call' and
+///  the position of `bar` arguments will hold an annotation with text
+///  'bar-args'.
+///
+///  Annotation text cannot span multiple lines and cannot contain '}'.
+class AnnotatedCode {
+  /// The source code without annotations.
+  final String sourceCode;
+
+  /// The annotations for the source code.
+  final List<Annotation> annotations;
+
+  AnnotatedCode.internal(this.sourceCode, this.annotations);
+
+  /// Creates an [AnnotatedCode] by processing [annotatedCode]. Annotation of
+  /// the form `@{...}` are converted into [Annotation]s and removed from the
+  /// [annotatedCode] to process the source code.
+  factory AnnotatedCode(String annotatedCode) {
+    StringBuffer codeBuffer = new StringBuffer();
+    List<Annotation> annotations = <Annotation>[];
+    int index = 0;
+    int offset = 0;
+    int lineNo = 1;
+    int columnNo = 1;
+    while (index < annotatedCode.length) {
+      int charCode = annotatedCode.codeUnitAt(index);
+      switch (charCode) {
+        case _LF:
+          codeBuffer.write('\n');
+          offset++;
+          lineNo++;
+          columnNo = 1;
+          break;
+        case _CR:
+          if (index + 1 < annotatedCode.length &&
+              annotatedCode.codeUnitAt(index + 1) == _LF) {
+            index++;
+          }
+          codeBuffer.write('\n');
+          offset++;
+          lineNo++;
+          columnNo = 1;
+          break;
+        case 0x40:
+          if (index + 1 < annotatedCode.length &&
+              annotatedCode.codeUnitAt(index + 1) == _LBRACE) {
+            int endIndex = annotatedCode.indexOf('}', index);
+            String text = annotatedCode.substring(index + 2, endIndex);
+            annotations.add(new Annotation(lineNo, columnNo, offset, text));
+            index = endIndex;
+          } else {
+            codeBuffer.writeCharCode(charCode);
+            offset++;
+            columnNo++;
+          }
+          break;
+        default:
+          codeBuffer.writeCharCode(charCode);
+          offset++;
+          columnNo++;
+      }
+      index++;
+    }
+    return new AnnotatedCode.internal(codeBuffer.toString(), annotations);
+  }
+}
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index 4b3bfaf..22d2c68 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -69,7 +69,6 @@
 value_range_test: Pass, Slow
 jsinterop/world_test: Pass, Slow
 sourcemaps/stacktrace_test: Pass, Slow
-kernel/impact_test: Skip # Times out. Issue 28157
 
 [ $mode == debug ]
 check_elements_invariants_test: Skip # Slow and only needs to be run in one
diff --git a/tests/compiler/dart2js/inference/enumerator.dart b/tests/compiler/dart2js/inference/enumerator.dart
new file mode 100644
index 0000000..07328da
--- /dev/null
+++ b/tests/compiler/dart2js/inference/enumerator.dart
@@ -0,0 +1,52 @@
+// 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:compiler/src/resolution/access_semantics.dart';
+import 'package:compiler/src/resolution/send_structure.dart';
+import 'package:compiler/src/resolution/tree_elements.dart';
+import 'package:compiler/src/tree/nodes.dart' as ast;
+
+/// Id for a code point with type inference information.
+// TODO(johnniwinther): Create an [Id]-based equivalence with the kernel IR.
+class Id {
+  final int value;
+
+  const Id(this.value);
+
+  int get hashCode => value.hashCode;
+
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! Id) return false;
+    return value == other.value;
+  }
+
+  String toString() => value.toString();
+}
+
+abstract class AstEnumeratorMixin {
+  TreeElements get elements;
+
+  Id computeAccessId(ast.Send node, AccessSemantics access) {
+    switch (access.kind) {
+      case AccessKind.DYNAMIC_PROPERTY:
+        return new Id(node.selector.getBeginToken().charOffset);
+      default:
+        return new Id(node.getBeginToken().charOffset);
+    }
+  }
+
+  Id computeId(ast.Send node) {
+    var sendStructure = elements.getSendStructure(node);
+    if (sendStructure == null) return null;
+    switch (sendStructure.kind) {
+      case SendStructureKind.GET:
+      case SendStructureKind.INVOKE:
+      case SendStructureKind.INCOMPATIBLE_INVOKE:
+        return computeAccessId(node, sendStructure.semantics);
+      default:
+        return new Id(node.getBeginToken().charOffset);
+    }
+  }
+}
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
new file mode 100644
index 0000000..4a916af
--- /dev/null
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -0,0 +1,106 @@
+// 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:compiler/src/common.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/resolution/tree_elements.dart';
+import 'package:compiler/src/tree/nodes.dart';
+import 'package:compiler/src/types/types.dart';
+import 'package:expect/expect.dart';
+
+import '../annotated_code_helper.dart';
+import '../memory_compiler.dart';
+import 'enumerator.dart';
+
+checkCode(String annotatedCode) async {
+  AnnotatedCode code = new AnnotatedCode(annotatedCode);
+  Map<Id, String> expectedMap = computeExpectedMap(code);
+  Compiler compiler =
+      compilerFor(memorySourceFiles: {'main.dart': code.sourceCode});
+  compiler.stopAfterTypeInference = true;
+  Uri mainUri = Uri.parse('memory:main.dart');
+  await compiler.run(mainUri);
+  compiler.mainApp.forEachLocalMember((member) {
+    if (member.isFunction) {
+      checkMember(compiler, expectedMap, member);
+    } else if (member.isClass) {
+      member.forEachLocalMember((member) {
+        checkMember(compiler, expectedMap, member);
+      });
+    }
+  });
+  expectedMap.forEach((Id id, String expected) {
+    reportHere(
+        compiler.reporter,
+        new SourceSpan(mainUri, id.value, id.value + 1),
+        'expected:${expected},actual:null');
+  });
+}
+
+void checkMember(
+    Compiler compiler, Map<Id, String> expectedMap, MemberElement member) {
+  ResolvedAst resolvedAst = member.resolvedAst;
+  if (resolvedAst.kind != ResolvedAstKind.PARSED) return;
+  compiler.reporter.withCurrentElement(member.implementation, () {
+    resolvedAst.node.accept(new TypeMaskChecker(
+        compiler.reporter,
+        expectedMap,
+        resolvedAst.elements,
+        compiler.globalInference.results.resultOf(member)));
+  });
+}
+
+Map<Id, String> computeExpectedMap(AnnotatedCode code) {
+  Map<Id, String> map = <Id, String>{};
+  for (Annotation annotation in code.annotations) {
+    map[new Id(annotation.offset)] = annotation.text;
+  }
+  return map;
+}
+
+class TypeMaskChecker extends Visitor with AstEnumeratorMixin {
+  final DiagnosticReporter reporter;
+  final Map<Id, String> expectedMap;
+  final TreeElements elements;
+  final GlobalTypeInferenceElementResult result;
+
+  TypeMaskChecker(this.reporter, this.expectedMap, this.elements, this.result);
+
+  visitNode(Node node) {
+    node.visitChildren(this);
+  }
+
+  String annotationForId(Id id) {
+    if (id == null) return null;
+    return expectedMap.remove(id);
+  }
+
+  void checkValue(Node node, String expected, TypeMask value) {
+    if (value != null || expected != null) {
+      String valueText = '$value';
+      if (valueText != expected) {
+        reportHere(reporter, node, 'expected:${expected},actual:${value}');
+      }
+      Expect.equals(expected, valueText);
+    }
+  }
+
+  void checkSend(Send node) {
+    Id id = computeId(node);
+    TypeMask value = result.typeOfSend(node);
+    String expected = annotationForId(id);
+    checkValue(node, expected, value);
+  }
+
+  visitSend(Send node) {
+    checkSend(node);
+    visitNode(node);
+  }
+
+  visitSendSet(SendSet node) {
+    checkSend(node);
+    visitNode(node);
+  }
+}
diff --git a/tests/compiler/dart2js/inference/send_test.dart b/tests/compiler/dart2js/inference/send_test.dart
new file mode 100644
index 0000000..4aaae6d
--- /dev/null
+++ b/tests/compiler/dart2js/inference/send_test.dart
@@ -0,0 +1,31 @@
+// 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:async_helper/async_helper.dart';
+import 'inference_test_helper.dart';
+
+const List<String> TESTS = const <String>[
+  '''
+class Super {
+  var field = 42;
+}
+class Sub extends Super {
+  method() {
+   var a = super.field = new Sub();
+   return a.@{[exact=Sub]}method;
+  }
+}
+main() {
+  new Sub().@{[exact=Sub]}method();
+}
+''',
+];
+
+main() {
+  asyncTest(() async {
+    for (String annotatedCode in TESTS) {
+      await checkCode(annotatedCode);
+    }
+  });
+}
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 28487cd..e011e2d 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -614,6 +614,7 @@
 };
 
 main(List<String> args) {
+  bool fullTest = args.contains('--full');
   asyncTest(() async {
     enableDebugMode();
     Uri entryPoint = Uri.parse('memory:main.dart');
@@ -621,17 +622,20 @@
         entryPoint: entryPoint,
         memorySourceFiles: SOURCE,
         options: [
-          Flags.analyzeAll,
+          fullTest ? Flags.analyzeAll : Flags.analyzeOnly,
           Flags.useKernel,
           Flags.enableAssertMessage
         ]);
     compiler.resolution.retainCachesForTesting = true;
     await compiler.run(entryPoint);
-    checkLibrary(compiler, compiler.mainApp, fullTest: args.contains('--full'));
-    compiler.libraryLoader.libraries.forEach((LibraryElement library) {
-      if (library == compiler.mainApp) return;
-      checkLibrary(compiler, library, fullTest: args.contains('--full'));
-    });
+    checkLibrary(compiler, compiler.mainApp, fullTest: fullTest);
+    if (fullTest) {
+      // TODO(johnniwinther): Handle all libraries for `!fullTest`.
+      compiler.libraryLoader.libraries.forEach((LibraryElement library) {
+        if (library == compiler.mainApp) return;
+        checkLibrary(compiler, library, fullTest: fullTest);
+      });
+    }
   });
 }
 
@@ -655,6 +659,7 @@
     {bool fullTest: false}) {
   if (!fullTest) {
     if (element.library.isPlatformLibrary) {
+      // TODO(johnniwinther): Enqueue these elements for `!fullTest`.
       // Test only selected elements in web-related platform libraries since
       // this unittest otherwise takes too long to run.
       switch (element.library.canonicalUri.path) {
@@ -667,9 +672,9 @@
         case 'web_gl':
           if ('$element' ==
               'function(RenderingContext#getFramebufferAttachmentParameter)') {
-            return;
+            break;
           }
-          break;
+          return;
         case 'indexed_db':
           if ('$element' == 'field(ObjectStore#keyPath)') {
             break;
@@ -687,6 +692,9 @@
       return;
     }
   }
+  if (!fullTest && !compiler.resolution.hasResolutionImpact(element)) {
+    return;
+  }
   ResolutionImpact astImpact = compiler.resolution.getResolutionImpact(element);
   astImpact = laxImpact(compiler, element, astImpact);
   ResolutionImpact kernelImpact = build(compiler, element.resolvedAst);
@@ -709,12 +717,14 @@
         ConstructorElement effectiveTarget = constructor.effectiveTarget;
         ResolutionDartType effectiveTargetType =
             constructor.computeEffectiveTargetType(staticUse.type);
+        ConstructorElement effectiveTargetDeclaration =
+            effectiveTarget.declaration;
         builder.registerStaticUse(
             staticUse.kind == StaticUseKind.CONST_CONSTRUCTOR_INVOKE
                 ? new StaticUse.constConstructorInvoke(
-                    effectiveTarget.declaration, null, effectiveTargetType)
+                    effectiveTargetDeclaration, null, effectiveTargetType)
                 : new StaticUse.typedConstructorInvoke(
-                    effectiveTarget.declaration, null, effectiveTargetType));
+                    effectiveTargetDeclaration, null, effectiveTargetType));
         break;
       default:
         builder.registerStaticUse(staticUse);
diff --git a/tests/compiler/dart2js/kernel/loops_test.dart b/tests/compiler/dart2js/kernel/loops_test.dart
index 78385c7..b257e4b 100644
--- a/tests/compiler/dart2js/kernel/loops_test.dart
+++ b/tests/compiler/dart2js/kernel/loops_test.dart
@@ -84,4 +84,21 @@
 }''';
     return check(code, disableTypeInference: false);
   });
+
+  test('for loop with break to label', () {
+    String code = '''
+var a = 0;
+main() {
+  var sum = 0;
+  outer: for (a in [1, 2, 3]) {
+    for (int i = 0; i < 10; i++) {
+      sum += a;
+      if (a + i < 5)
+        break outer;
+    }
+  }
+  return sum;
+}''';
+    return check(code, disableTypeInference: false);
+  });
 }
diff --git a/tests/compiler/dart2js/kernel/switch_test.dart b/tests/compiler/dart2js/kernel/switch_test.dart
new file mode 100644
index 0000000..10bfdbf
--- /dev/null
+++ b/tests/compiler/dart2js/kernel/switch_test.dart
@@ -0,0 +1,184 @@
+import 'package:test/test.dart';
+
+import 'helper.dart' show check;
+
+main() {
+  test('simple switch statement', () {
+    String code = '''
+main() {
+  int x = 2;
+  switch(x) {
+    case 1:
+      print('spider');
+      break;
+    case 2:
+      print('grasshopper');
+      break;
+  }
+}''';
+    return check(code);
+  });
+
+  test('switch with default', () {
+    String code = '''
+main() {
+  int x = 5;
+  switch(x) {
+    case 1:
+      print('spider');
+      break;
+    case 2:
+      print('grasshopper');
+      break;
+    default:
+      print('ladybug');
+
+  }
+}''';
+    return check(code);
+  });
+
+/*
+  // TODO(efortuna): Uncomment. Because of patch file weirdness, the original
+  // SSA vs the Kernel version is instantiating a subclass of the
+  // FallThroughError, so it produces slightly different code. Fix that.
+  test('switch with fall through error', () {
+    String code = '''
+main() {
+  int x = 2;
+  switch(x) {
+    case 1:
+      print('spider');
+      break;
+    case 2:
+      print('grasshopper');
+    case 3:
+      print('ant');
+      break;
+    default:
+      print('ladybug');
+  }
+}''';
+    return check(code);
+  });
+*/
+  test('switch with multi-case branch', () {
+    String code = '''
+main() {
+  int x = 3;
+  switch(x) {
+    case 1:
+      print('spider');
+      break;
+    case 2:
+    case 3:
+    case 4:
+      print('grasshopper');
+      print('ant');
+      break;
+  }
+}''';
+    return check(code);
+  });
+
+  test('switch with weird fall-through end case', () {
+    String code = '''
+main() {
+    int x = 6;
+  switch(x) {
+    case 1:
+      print('spider');
+      break;
+    case 5:
+      print('beetle');
+      break;
+    case 6:
+  }
+}''';
+    return check(code);
+  });
+
+  test('switch with labeled continue', () {
+    String code = '''
+main() {
+    int x = 1;
+  switch(x) {
+    case 1:
+      print('spider');
+      continue world;
+    case 5:
+      print('beetle');
+      break;
+    world:
+    case 6:
+      print('cricket');
+      break;
+    default:
+      print('bat');
+  }
+}''';
+    return check(code);
+  });
+
+  test('switch with continue to fall through', () {
+    String code = '''
+main() {
+    int x = 1;
+  switch(x) {
+    case 1:
+      print('spider');
+      continue world;
+    world:
+    case 5:
+      print('beetle');
+      break;
+    case 6:
+      print('cricket');
+      break;
+    default:
+      print('bat');
+  }
+}''';
+    return check(code);
+  });
+
+  test('switch with continue without default case', () {
+    String code = '''
+main() {
+    int x = 1;
+  switch(x) {
+    case 1:
+      print('spider');
+      continue world;
+    world:
+    case 5:
+      print('beetle');
+      break;
+    case 6:
+      print('cricket');
+      break;
+  }
+}''';
+    return check(code);
+  });
+
+  test('switch with continue without default case', () {
+    String code = '''
+main() {
+    int x = 8;
+  switch(x) {
+    case 1:
+      print('spider');
+      continue world;
+    world:
+    case 5:
+      print('beetle');
+      break;
+    case 6:
+      print('cricket');
+      break;
+  }
+}''';
+    return check(code);
+  });
+}
diff --git a/tests/compiler/dart2js/minimal_resolution_test.dart b/tests/compiler/dart2js/minimal_resolution_test.dart
index 14dec29..a267acc 100644
--- a/tests/compiler/dart2js/minimal_resolution_test.dart
+++ b/tests/compiler/dart2js/minimal_resolution_test.dart
@@ -44,12 +44,10 @@
       compiler.resolution.wasProxyConstantComputedTestingOnly,
       "Unexpected computation of proxy constant.");
 
+  LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
   checkInstantiated(
-      compiler,
-      compiler.commonElements.coreLibrary.find('_Proxy'),
-      proxyConstantComputed);
-  checkInstantiated(compiler,
-      compiler.commonElements.coreLibrary.find('Deprecated'), deprecatedClass);
+      compiler, coreLibrary.find('_Proxy'), proxyConstantComputed);
+  checkInstantiated(compiler, coreLibrary.find('Deprecated'), deprecatedClass);
 
   LibraryElement jsHelperLibrary =
       compiler.libraryLoader.lookupLibrary(BackendHelpers.DART_JS_HELPER);
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 938449e..1f74b77 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -149,7 +149,8 @@
       // dynamic invocation the ArgumentTypesRegistry eventually iterates over
       // the interfaces of the Object class which would be 'null' if the class
       // wasn't resolved.
-      commonElements.objectClass.ensureResolved(resolution);
+      ClassElement objectClass = commonElements.objectClass;
+      objectClass.ensureResolved(resolution);
     }).then((_) => uri);
   }
 
diff --git a/tests/compiler/dart2js/related_types.dart b/tests/compiler/dart2js/related_types.dart
index 8b48303..99d9c31 100644
--- a/tests/compiler/dart2js/related_types.dart
+++ b/tests/compiler/dart2js/related_types.dart
@@ -262,7 +262,7 @@
   }
 
   @override
-  ResolutionDartType visitEquals(Send node, Node left, Node right, _) {
+  ResolutionInterfaceType visitEquals(Send node, Node left, Node right, _) {
     ResolutionDartType leftType = apply(left);
     ResolutionDartType rightType = apply(right);
     checkRelated(node, leftType, rightType);
@@ -270,7 +270,7 @@
   }
 
   @override
-  ResolutionDartType visitNotEquals(Send node, Node left, Node right, _) {
+  ResolutionInterfaceType visitNotEquals(Send node, Node left, Node right, _) {
     ResolutionDartType leftType = apply(left);
     ResolutionDartType rightType = apply(right);
     checkRelated(node, leftType, rightType);
@@ -289,17 +289,17 @@
   }
 
   @override
-  ResolutionDartType visitLiteralInt(LiteralInt node) {
+  ResolutionInterfaceType visitLiteralInt(LiteralInt node) {
     return commonElements.intType;
   }
 
   @override
-  ResolutionDartType visitLiteralString(LiteralString node) {
+  ResolutionInterfaceType visitLiteralString(LiteralString node) {
     return commonElements.stringType;
   }
 
   @override
-  ResolutionDartType visitLiteralBool(LiteralBool node) {
+  ResolutionInterfaceType visitLiteralBool(LiteralBool node) {
     return commonElements.boolType;
   }
 
diff --git a/tests/compiler/dart2js/sourcemaps/js_tracer.dart b/tests/compiler/dart2js/sourcemaps/js_tracer.dart
index 6faf88e..6901e40 100644
--- a/tests/compiler/dart2js/sourcemaps/js_tracer.dart
+++ b/tests/compiler/dart2js/sourcemaps/js_tracer.dart
@@ -82,6 +82,8 @@
         js.Switch switchNode = node;
         text = ['switch(', switchNode.key, ') ...'];
         break;
+      case StepKind.NO_INFO:
+        break;
     }
     createTraceStep(kind, node,
         offset: offset,
diff --git a/tests/compiler/dart2js/sourcemaps/load.dart b/tests/compiler/dart2js/sourcemaps/load.dart
index 29cb8e0..d2ef009 100644
--- a/tests/compiler/dart2js/sourcemaps/load.dart
+++ b/tests/compiler/dart2js/sourcemaps/load.dart
@@ -74,17 +74,19 @@
       } else {
         position = '$line,$columnStart-';
       }
-      if (entry.sourceUrlId != null) {
-        int sourceUrlId = entry.sourceUrlId;
-        int sourceLine = entry.sourceLine + 1;
-        int sourceColumn = entry.sourceColumn + 1;
+      if (entry.sourceUrlId != null || columnEnd == null) {
         if (needsComma) {
           sb.write(',\n');
         }
         sb.write('    {"target": "$position"');
-        sb.write(', "source": "$sourceUrlId:$sourceLine,$sourceColumn"');
-        if (entry.sourceNameId != null) {
-          sb.write(', "name": "${sourceMap.names[entry.sourceNameId]}"');
+        if (entry.sourceUrlId != null) {
+          int sourceUrlId = entry.sourceUrlId;
+          int sourceLine = entry.sourceLine + 1;
+          int sourceColumn = entry.sourceColumn + 1;
+          sb.write(', "source": "$sourceUrlId:$sourceLine,$sourceColumn"');
+          if (entry.sourceNameId != null) {
+            sb.write(', "name": "${sourceMap.names[entry.sourceNameId]}"');
+          }
         }
         sb.write('}');
         needsComma = true;
diff --git a/tests/compiler/dart2js/sourcemaps/sourcemap_visualizer.dart b/tests/compiler/dart2js/sourcemaps/sourcemap_visualizer.dart
new file mode 100644
index 0000000..3b6a96d
--- /dev/null
+++ b/tests/compiler/dart2js/sourcemaps/sourcemap_visualizer.dart
@@ -0,0 +1,194 @@
+// 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.
+
+/// Tool for visualizing the source mapped parts of a generated JS file.
+
+import 'dart:convert';
+import 'dart:io';
+import 'package:source_maps/source_maps.dart';
+import 'sourcemap_html_helper.dart';
+
+main(List<String> args) {
+  String jsFileName = 'out.js';
+  if (args.length > 0) {
+    jsFileName = args[0];
+  }
+  String jsMapFileName = '$jsFileName.map';
+  if (args.length > 1) {
+    jsMapFileName = args[1];
+  }
+  generateHtml(jsFileName, jsMapFileName);
+}
+
+class MappingState {
+  final String cssClass;
+  final int _continuedState;
+  final int _nextState;
+
+  const MappingState(this.cssClass, this._continuedState, this._nextState);
+
+  MappingState get continuedState => values[_continuedState];
+
+  MappingState get nextState => values[_nextState];
+
+  static const MappingState INITIAL = const MappingState('initial', 0, 1);
+  static const MappingState MAPPED0 = const MappingState('mapped0', 2, 3);
+  static const MappingState MAPPED0_CONTINUED =
+      const MappingState('mapped0continued', 2, 3);
+  static const MappingState MAPPED1 = const MappingState('mapped1', 4, 1);
+  static const MappingState MAPPED1_CONTINUED =
+      const MappingState('mapped1continued', 4, 1);
+  static const MappingState UNMAPPED = const MappingState('unmapped', 5, 1);
+
+  static const List<MappingState> values = const <MappingState>[
+    INITIAL,
+    MAPPED0,
+    MAPPED0_CONTINUED,
+    MAPPED1,
+    MAPPED1_CONTINUED,
+    UNMAPPED
+  ];
+}
+
+void generateHtml(String jsFileName, String jsMapFileName) {
+  String jsFile = new File(jsFileName).readAsStringSync();
+  String jsMapFile = new File(jsMapFileName).readAsStringSync();
+  SingleMapping mapping = new SingleMapping.fromJson(JSON.decode(jsMapFile));
+  StringBuffer output = new StringBuffer();
+  output.write('''
+<html>
+  <head>
+    <title>${escape(jsFileName)} / ${escape(jsMapFileName)}</title>
+    <style type="text/css">
+      .initial{
+        background-color: #FFFFFF;
+      }
+      .mapped0 {
+        background-color: #E0E0C0;
+      }
+      .mapped0continued {
+        background-color: #F8F8D8;
+      }
+      .mapped1 {
+        background-color: #C0E0E0;
+      }
+      .mapped1continued {
+        background-color: #D8F8F8;
+      }
+      .unmapped {
+        background-color: #E0E0E0;
+      }
+      .code {
+        font-family: monospace;
+        white-space: pre;
+        font-size: smaller;
+      }
+      .lineNumber {
+        color: #C0C0C0;
+        font-size: small;
+      }
+      .legend {
+        position: fixed;
+        top: 5px;
+        right: 5px;
+        border: 1px solid black;
+        padding: 5px;
+        background-color: #F0F0F0;
+      }
+      .box {
+        border: 1px solid grey;
+      }
+    </style>
+  </head>
+  <body>
+  <div class="legend">
+    <span class="initial">&nbsp;&nbsp;&nbsp;&nbsp;</span> no mapping (yet)<br/>
+    <span class="mapped0">&nbsp;&nbsp;</span>
+      <span class="mapped1">&nbsp;&nbsp;</span> mapped<br/>
+    <span class="mapped0continued">&nbsp;&nbsp;</span>
+      <span class="mapped1continued">&nbsp;&nbsp;</span> mapping
+        continued from previous line<br/>
+    <span class="unmapped">&nbsp;&nbsp;&nbsp;&nbsp;</span> mapping off<br/>
+  </div>
+  <pre class="code">
+''');
+
+  MappingState state = MappingState.INITIAL;
+  TargetEntry lastEntry;
+
+  void write(String text, TargetEntry entry) {
+    output.write('<span class="${state.cssClass}"');
+    String prefix = '';
+    if (entry == lastEntry) {
+      prefix = 'continued: ';
+    }
+    lastEntry = entry;
+    if (lastEntry != null) {
+      if (lastEntry.sourceUrlId != null) {
+        output.write(' title="$prefix');
+        output.write(escape(mapping.urls[lastEntry.sourceUrlId]));
+        output.write(
+            ':${lastEntry.sourceLine + 1}:${lastEntry.sourceColumn + 1}');
+        if (lastEntry.sourceNameId != null) {
+          output.write(' (');
+          output.write(escape(mapping.names[lastEntry.sourceNameId]));
+          output.write(')');
+        }
+        output.write('"');
+      } else {
+        output.write(' title="unmapped"');
+      }
+    }
+    output.write('>');
+    output.write(escape(text));
+    output.write('</span>');
+  }
+
+  int nextTargetLineIndex = 0;
+  List<String> lines = jsFile.split('\n');
+  int lineNoWidth = '${lines.length}'.length;
+  for (int lineNo = 0; lineNo < lines.length; lineNo++) {
+    output.write(lineNumber(lineNo, width: lineNoWidth));
+    String line = lines[lineNo];
+    TargetLineEntry targetLineEntry;
+    while (nextTargetLineIndex < mapping.lines.length) {
+      TargetLineEntry entry = mapping.lines[nextTargetLineIndex];
+      if (entry.line == lineNo) {
+        targetLineEntry = entry;
+        nextTargetLineIndex++;
+        break;
+      } else if (entry.line > lineNo) {
+        break;
+      } else {
+        nextTargetLineIndex++;
+      }
+    }
+    if (targetLineEntry != null) {
+      int columnNo = 0;
+      for (int index = 0; index < targetLineEntry.entries.length; index++) {
+        TargetEntry entry = targetLineEntry.entries[index];
+        if (entry.column > columnNo) {
+          write(line.substring(columnNo, entry.column), lastEntry);
+          columnNo = entry.column;
+        }
+        state =
+            entry.sourceUrlId != null ? state.nextState : MappingState.UNMAPPED;
+        int end;
+        if (index + 1 < targetLineEntry.entries.length) {
+          end = targetLineEntry.entries[index + 1].column;
+        } else {
+          end = line.length;
+        }
+        write(line.substring(entry.column, end), entry);
+        columnNo = end;
+      }
+    } else {
+      write(line, lastEntry);
+    }
+    output.write('\n');
+    state = state.continuedState;
+  }
+  output.write('</pre></body></html>');
+  new File('out.js.map.html').writeAsStringSync(output.toString());
+}
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart b/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart
index 89d1ff7..185b8a5 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart
@@ -15,6 +15,7 @@
 import 'package:source_maps/source_maps.dart';
 import 'package:source_maps/src/utils.dart';
 
+import '../annotated_code_helper.dart';
 import '../source_map_validator_helper.dart';
 
 const String EXCEPTION_MARKER = '>ExceptionMarker<';
@@ -116,6 +117,19 @@
   '''
 import 'package:expect/expect.dart';
 main() {
+  @{1:main}test(new Class());
+}
+@NoInline()
+test(c) {
+  @{2:test}c.field.method();
+}
+class Class {
+  var field;
+}
+''',
+  '''
+import 'package:expect/expect.dart';
+main() {
   // This call is no longer on the stack when the error is thrown.
   @{:main}test();
 }
@@ -184,60 +198,28 @@
 const int _LBRACE = 0x7B;
 
 Test processTestCode(String code) {
-  StringBuffer codeBuffer = new StringBuffer();
   Map<int, StackTraceLine> stackTraceMap = <int, StackTraceLine>{};
   List<StackTraceLine> unexpectedLines = <StackTraceLine>[];
-  int index = 0;
-  int lineNo = 1;
-  int columnNo = 1;
-  while (index < code.length) {
-    int charCode = code.codeUnitAt(index);
-    switch (charCode) {
-      case _LF:
-        codeBuffer.write('\n');
-        lineNo++;
-        columnNo = 1;
-        break;
-      case _CR:
-        if (index + 1 < code.length && code.codeUnitAt(index + 1) == _LF) {
-          index++;
-        }
-        codeBuffer.write('\n');
-        lineNo++;
-        columnNo = 1;
-        break;
-      case 0x40:
-        if (index + 1 < code.length && code.codeUnitAt(index + 1) == _LBRACE) {
-          int colonIndex = code.indexOf(':', index);
-          int endIndex = code.indexOf('}', index);
-          String methodName = code.substring(colonIndex + 1, endIndex);
-          String indexText = code.substring(index + 2, colonIndex);
-          StackTraceLine stackTraceLine =
-              new StackTraceLine(methodName, INPUT_FILE_NAME, lineNo, columnNo);
-          if (indexText == '') {
-            unexpectedLines.add(stackTraceLine);
-          } else {
-            int stackTraceIndex = int.parse(indexText);
-            assert(!stackTraceMap.containsKey(stackTraceIndex));
-            stackTraceMap[stackTraceIndex] = stackTraceLine;
-          }
-          index = endIndex;
-        } else {
-          codeBuffer.writeCharCode(charCode);
-          columnNo++;
-        }
-        break;
-      default:
-        codeBuffer.writeCharCode(charCode);
-        columnNo++;
+  AnnotatedCode annotatedCode = new AnnotatedCode(code);
+  for (Annotation annotation in annotatedCode.annotations) {
+    int colonIndex = annotation.text.indexOf(':');
+    String indexText = annotation.text.substring(0, colonIndex);
+    String methodName = annotation.text.substring(colonIndex + 1);
+    StackTraceLine stackTraceLine = new StackTraceLine(
+        methodName, INPUT_FILE_NAME, annotation.lineNo, annotation.columnNo);
+    if (indexText == '') {
+      unexpectedLines.add(stackTraceLine);
+    } else {
+      int stackTraceIndex = int.parse(indexText);
+      assert(!stackTraceMap.containsKey(stackTraceIndex));
+      stackTraceMap[stackTraceIndex] = stackTraceLine;
     }
-    index++;
   }
   List<StackTraceLine> expectedLines = <StackTraceLine>[];
   for (int stackTraceIndex in (stackTraceMap.keys.toList()..sort()).reversed) {
     expectedLines.add(stackTraceMap[stackTraceIndex]);
   }
-  return new Test(codeBuffer.toString(), expectedLines, unexpectedLines);
+  return new Test(annotatedCode.sourceCode, expectedLines, unexpectedLines);
 }
 
 void main(List<String> arguments) {
@@ -308,15 +290,9 @@
   }
   List<String> lines = out.split(new RegExp(r'(\r|\n|\r\n)'));
   List<StackTraceLine> jsStackTrace = <StackTraceLine>[];
-  bool seenMarker = false;
   for (String line in lines) {
-    if (seenMarker) {
-      line = line.trim();
-      if (line.startsWith('at ')) {
-        jsStackTrace.add(new StackTraceLine.fromText(line));
-      }
-    } else if (line == EXCEPTION_MARKER) {
-      seenMarker = true;
+    if (line.startsWith('    at ')) {
+      jsStackTrace.add(new StackTraceLine.fromText(line));
     }
   }
 
@@ -324,15 +300,15 @@
   for (StackTraceLine line in jsStackTrace) {
     TargetEntry targetEntry = _findColumn(line.lineNo - 1, line.columnNo - 1,
         _findLine(sourceMap, line.lineNo - 1));
-    if (targetEntry == null) {
+    if (targetEntry == null || targetEntry.sourceUrlId == null) {
       dartStackTrace.add(line);
     } else {
       String methodName;
-      if (targetEntry.sourceNameId != 0) {
+      if (targetEntry.sourceNameId != null) {
         methodName = sourceMap.names[targetEntry.sourceNameId];
       }
       String fileName;
-      if (targetEntry.sourceUrlId != 0) {
+      if (targetEntry.sourceUrlId != null) {
         fileName = sourceMap.urls[targetEntry.sourceUrlId];
       }
       dartStackTrace.add(new StackTraceLine(methodName, fileName,
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index 10fb244..b41971d 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -71,7 +71,7 @@
 }
 
 testSimpleTypes(MockCompiler compiler) {
-  checkType(ResolutionDartType type, String code) {
+  checkType(ResolutionInterfaceType type, String code) {
     Expect.equals(type, analyzeType(compiler, code));
   }
 
diff --git a/tests/compiler/dart2js/type_combination_test.dart b/tests/compiler/dart2js/type_combination_test.dart
index 153ef44..f54364e 100644
--- a/tests/compiler/dart2js/type_combination_test.dart
+++ b/tests/compiler/dart2js/type_combination_test.dart
@@ -768,7 +768,8 @@
 
     // Grab hold of a supertype for String so we can produce potential
     // string types.
-    patternClass = closedWorld.commonElements.coreLibrary.find('Pattern');
+    LibraryElement coreLibrary = closedWorld.commonElements.coreLibrary;
+    patternClass = coreLibrary.find('Pattern');
 
     nonPrimitive1 = new TypeMask.nonNullSubtype(
         closedWorld.commonElements.mapClass, closedWorld);
diff --git a/tests/corelib_strong/dynamic_nosuchmethod_test.dart b/tests/corelib_strong/dynamic_nosuchmethod_test.dart
new file mode 100644
index 0000000..03c0a80
--- /dev/null
+++ b/tests/corelib_strong/dynamic_nosuchmethod_test.dart
@@ -0,0 +1,77 @@
+// 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:expect/expect.dart";
+import 'dart:mirrors';
+
+// Test that noSuchMethod calls behave as expected for dynamic object invocations.
+class BaseClass {
+  final dynamic finalField = "final!";
+
+  baz() => "baz!!";
+  get bla => (() => "bla!!");
+}
+
+class ReturnInvocationName extends BaseClass {
+  var _bar;
+
+  ReturnInvocationName(this._bar);
+
+  noSuchMethod(Invocation invocation) {
+    return MirrorSystem.getName(invocation.memberName);
+  }
+
+  bar() {
+    return _bar;
+  }
+}
+
+class Foo {}
+
+main() {
+  dynamic x = new ReturnInvocationName(42);
+  Expect.equals('final!', x.finalField);
+
+  // https://github.com/dart-lang/sdk/issues/28363
+  // Expect.throws(() => x.finalField = "foo",
+  //              (e) => e is NoSuchMethodError);
+  Expect.equals('final!', x.finalField);
+
+  Expect.equals('_prototype', x._prototype);
+  Expect.equals('_prototype', x._prototype());
+
+  Expect.equals('prototype', x.prototype);
+  Expect.equals('prototype', x.prototype());
+
+  Expect.equals('constructor', x.constructor);
+  Expect.equals('constructor', x.constructor());
+
+  Expect.equals('__proto__', x.__proto__);
+  Expect.equals('__proto__', x.__proto__);
+
+  Expect.equals(42, x.bar());
+  Expect.equals(42, (x.bar)());
+
+  Expect.equals('unary-', -x);
+  Expect.equals('+', x + 42);
+  Expect.equals('[]', x[4]);
+
+  // Verify that noSuchMethod errors are triggered even when the JS object
+  // happens to have a matching member name.
+  dynamic f = new Foo();
+  Expect.throws(() => f.prototype, (e) => e is NoSuchMethodError);
+  Expect.throws(() => f.prototype(), (e) => e is NoSuchMethodError);
+  Expect.throws(() => f.prototype = 42, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => f.constructor, (e) => e is NoSuchMethodError);
+  Expect.throws(() => f.constructor(), (e) => e is NoSuchMethodError);
+  Expect.throws(() => f.constructor = 42, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => f.__proto__, (e) => e is NoSuchMethodError);
+
+  // These are valid JS properties but not Dart methods.
+  Expect.throws(() => f.toLocaleString, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => f.hasOwnProperty, (e) => e is NoSuchMethodError);
+}
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index eb12d24..f9ff809 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -243,8 +243,3 @@
 deferred_in_isolate2_test: Crash # Requires deferred libraries
 issue_21398_parent_isolate2_test: Crash # Requires deferred libraries
 spawn_uri_nested_vm_test: Pass, Crash # Issue 28192
-
-[ $builder_tag == asan && $arch == x64 ]
-function_send_test: Fail # Issue 28351
-function_send1_test: Fail # Issue 28351
-issue_21398_parent_isolate_test: Fail # Issue 28351
diff --git a/tests/language/bad_constructor_test.dart b/tests/language/bad_constructor_test.dart
index 02ac4e5..4c0b17e 100644
--- a/tests/language/bad_constructor_test.dart
+++ b/tests/language/bad_constructor_test.dart
@@ -13,9 +13,9 @@
   var m;
   A.m() { m = 0; }  /// 04: compile-time error
 
-  set q(var value) { m = q; }  // No name conflict with q=.
-  // The runtime error occurs because main calls new A() instead of new A.q().
-  A.q();   /// 05: runtime error
+  set q(var value) { m = 0; }  // No name conflict with q=.
+  A.q();   /// 05: ok
+  A();     /// 05: ok
 
   A.foo() : m = 0;  /// 06: compile-time error
   int foo(int a, int b) => a + b * m;
diff --git a/tests/language/generic_methods_generic_function_parameter_test.dart b/tests/language/generic_methods_generic_function_parameter_test.dart
index 45014c4..3992286 100644
--- a/tests/language/generic_methods_generic_function_parameter_test.dart
+++ b/tests/language/generic_methods_generic_function_parameter_test.dart
@@ -7,11 +7,11 @@
 import "package:expect/expect.dart";
 
 class C<T> {
-  bar<V>(T t, int u, V v) => t + u + v;
-  foo<U>(bar<V>(T t, U u, V v)) => bar<int>(1, 2, 3);
+  bar<V>(T t, int u, V v) => t.toString() + u.toString() + v.toString();
+  foo<U>(bar<V>(T t, U u, V v)) => bar<int>(1 as T, 2 as U, 3);
 }
 
 main() {
   var c = new C<int>();
-  Expect.equals(6, c.foo<int>(c.bar));
+  Expect.equals("123", c.foo<int>(c.bar));
 }
diff --git a/tests/language/generic_methods_type_expression_test.dart b/tests/language/generic_methods_type_expression_test.dart
index ccf24bc..4597370 100644
--- a/tests/language/generic_methods_type_expression_test.dart
+++ b/tests/language/generic_methods_type_expression_test.dart
@@ -12,11 +12,11 @@
 
 import "package:expect/expect.dart";
 
-bool f1<T>(Object o) => o is T;
+bool f1<T>(Object o) => o is T;   /// 01: static type warning
 
 bool f2<T>(Object o) => o is List<T>;
 
-bool f3<T>(Object o) => o is! T;
+bool f3<T>(Object o) => o is! T;   /// 03: static type warning
 
 bool f4<T>(Object o) => o is! List<T>;
 
@@ -42,12 +42,12 @@
 main() {
   String s = "Hello!";
   List<String> ss = <String>[s];
-  Expect.throws(() => f1<int>(42), (e) => e is TypeError);
-  Expect.throws(() => f1<String>(42), (e) => e is TypeError);
+  Expect.throws(() => f1<int>(42), (e) => e is TypeError);  /// 01: continued
+  Expect.throws(() => f1<String>(42), (e) => e is TypeError);  /// 01: continued
   Expect.equals(f2<int>(<int>[42]), true);
   Expect.equals(f2<String>(<int>[42]), true); // `is List<dynamic>` is true.
-  Expect.throws(() => f3<int>(42), (e) => e is TypeError);
-  Expect.throws(() => f3<String>(42), (e) => e is TypeError);
+  Expect.throws(() => f3<int>(42), (e) => e is TypeError);  /// 03: continued
+  Expect.throws(() => f3<String>(42), (e) => e is TypeError);  /// 03: continued
   Expect.equals(f4<int>(<int>[42]), false);
   Expect.equals(f4<String>(<int>[42]), false); // `is! List<dynamic>` is false.
   Expect.equals(f5<String>(s), s); // `s as dynamic == s`
diff --git a/tests/language/language.status b/tests/language/language.status
index 869565b..717b3d4 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -40,11 +40,7 @@
 cyclic_type2_test: Fail, OK
 least_upper_bound_expansive_test/*: Fail, OK
 
-
 [ $compiler == none || $compiler == precompiler || $compiler == app_jit ]
-
-enum_test: RuntimeError # Issue 28341
-
 dynamic_prefix_core_test/01: RuntimeError # Issue 12478
 multiline_strings_test: Fail # Issue 23020
 
@@ -311,6 +307,14 @@
 [$runtime == vm && $compiler == none && $system == windows && $arch == ia32]
 vm/optimized_stacktrace_test: Pass, Crash # Issue 28276
 
+[$runtime == vm && $compiler == none && $system == fuchsia]
+# Use package:unittest
+async_await_test: RuntimeError
+async_star_test: RuntimeError
+# TODO(zra): Investigate
+vm/regress_28325_test: RuntimeError
+closure_cycles_test: Crash
+
 [$compiler == dart2analyzer]
 vm/regress_27201_test: SkipByDesign # Loads bad library, so will always crash.
 config_import_corelib_test: StaticWarning, OK
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index 1c2ebdb..a0d13a5 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -7,33 +7,6 @@
 regress_26668_test: Fail # Issue 26678
 regress_27617_test/1: MissingCompileTimeError
 
-# Doesn't yet implement `covariant` keyword.
-covariant_test/06: MissingCompileTimeError # Issue 28167
-covariant_test/06b: MissingCompileTimeError # Issue 28167
-covariant_test/07: MissingCompileTimeError # Issue 28167
-covariant_test/08: MissingCompileTimeError # Issue 28167
-covariant_test/11: MissingCompileTimeError # Issue 28167
-covariant_test/15: MissingCompileTimeError # Issue 28167
-covariant_test/26: MissingCompileTimeError # Issue 28167
-covariant_test/26b: MissingCompileTimeError # Issue 28167
-covariant_test/27: MissingCompileTimeError # Issue 28167
-covariant_test/28: MissingCompileTimeError # Issue 28167
-covariant_test/31: MissingCompileTimeError # Issue 28167
-covariant_test/35: MissingCompileTimeError # Issue 28167
-covariant_test/40: CompileTimeError # Issue 28167
-covariant_test/40b: CompileTimeError # Issue 28167
-covariant_test/42: CompileTimeError # Issue 28167
-covariant_test/46: MissingCompileTimeError # Issue 28167
-covariant_test/46b: MissingCompileTimeError # Issue 28167
-covariant_test/47: MissingCompileTimeError # Issue 28167
-covariant_test/48: StaticWarning
-covariant_test/51: MissingCompileTimeError # Issue 28167
-covariant_test/52: CompileTimeError # Issue 28167
-covariant_test/54: CompileTimeError # Issue 28167
-covariant_test/55: MissingCompileTimeError # Issue 28167
-covariant_test/56: CompileTimeError # Issue 28167
-covariant_override_test: CompileTimeError # Issue 28167
-
 # Runtime negative test. No static errors or warnings.
 closure_call_wrong_argument_count_negative_test: skip
 
@@ -100,9 +73,6 @@
 interface_test/none: fail # Issue 11575
 syntax_test/none: fail # Issue 11575
 
-# test issue 11576
-bad_constructor_test/none: fail # Issue 11576
-
 # test issue 11577, has return type for []=
 cascade_test/none: fail # Issue 11577
 
@@ -210,7 +180,6 @@
 # The following tests are currently assumed to be failing because the test is wrong.
 #
 application_negative_test: CompileTimeError # Test Issue 14528
-bad_constructor_test/05: CompileTimeError # Test Issue 5337
 bad_initializer1_negative_test: CompileTimeError # Test Issue 14529
 bad_named_constructor_negative_test: CompileTimeError # Test Issue 18693
 body_less_constructor_wrong_arg_negative_test: CompileTimeError # Test Issue 18695
@@ -523,10 +492,6 @@
 for_in3_test: StaticWarning, OK # Test should have warning by design.
 for_in_side_effects_test: StaticWarning, OK # Test uses custom class that does not implement Iterable in for-in.
 
-# Experimental feature: Syntactic support for generic methods.
-generic_methods_type_expression_test: StaticWarning # Issue 25868
-generic_methods_generic_function_parameter_test: StaticWarning # Issue 25868
-
 # Experimental feature: Use initializing formals in initializers and constructor body.
 initializing_formal_type_test: StaticWarning # Issue 26658
 
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 08f95b1..49d844c 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -4,6 +4,7 @@
 
 [ $compiler == dart2js ]
 enum_test: Fail # Issue 28340
+regress_28341_test: Fail # Issue 28340
 deferred_not_loaded_check_test: Fail # Issue 27577
 getter_setter_in_lib_test: Fail # Issue 23288
 method_name_test: Fail # issue 25574
diff --git a/tests/language/language_kernel.status b/tests/language/language_kernel.status
index 2a1aad7..c53b287 100644
--- a/tests/language/language_kernel.status
+++ b/tests/language/language_kernel.status
@@ -11,19 +11,15 @@
 ###############################################################################
 
 [ $compiler == dartk || $compiler == dartkp ]
-bad_constructor_test/05: DartkCompileTimeError
 conditional_import_string_test: DartkCompileTimeError
 conditional_import_test: DartkCompileTimeError
 conflicting_type_variable_and_setter_test: DartkCompileTimeError
 const_for_in_variable_test/01: MissingCompileTimeError
 constructor_duplicate_final_test/03: MissingCompileTimeError
-covariant_override_test: DartkCrash
 deep_nesting1_negative_test: DartkCrash
 deep_nesting2_negative_test: DartkCrash
-deferred_closurize_load_library_test: DartkCrash
+enum_syntax_test/05: MissingCompileTimeError
 enum_syntax_test/06: MissingCompileTimeError
-export_double_same_main_test: DartkCrash
-export_main_test: DartkCrash
 external_test/21: MissingCompileTimeError
 external_test/24: MissingCompileTimeError
 external_test/25: MissingCompileTimeError
@@ -31,7 +27,6 @@
 final_syntax_test/02: MissingCompileTimeError
 final_syntax_test/03: MissingCompileTimeError
 final_syntax_test/04: MissingCompileTimeError
-main_not_a_function_test/01: DartkCrash
 metadata_test: DartkCompileTimeError
 multiline_newline_test/01: DartkCompileTimeError
 multiline_newline_test/02: DartkCompileTimeError
@@ -39,48 +34,24 @@
 multiline_newline_test/04: MissingCompileTimeError
 multiline_newline_test/05: MissingCompileTimeError
 multiline_newline_test/06: MissingCompileTimeError
-no_main_test/01: DartkCrash
 not_enough_positional_arguments_test/01: DartkCompileTimeError
 regress_27617_test/1: MissingCompileTimeError
-super_call3_test/01: DartkCrash
 type_variable_conflict2_test/02: MissingCompileTimeError
 vm/debug_break_enabled_vm_test/01: DartkCompileTimeError
 vm/debug_break_enabled_vm_test/none: DartkCompileTimeError
 vm/reflect_core_vm_test: DartkCompileTimeError
 vm/regress_27201_test: DartkCompileTimeError
 vm/regress_28325_test: RuntimeError  # Issue 28055.
-covariant_test/06: MissingCompileTimeError # 28166
-covariant_test/06b: MissingCompileTimeError # 28166
-covariant_test/07: MissingCompileTimeError # 28166
-covariant_test/08: MissingCompileTimeError # 28166
-covariant_test/11: MissingCompileTimeError # 28166
-covariant_test/15: MissingCompileTimeError # 28166
-covariant_test/26: MissingCompileTimeError # 28166
-covariant_test/26b: MissingCompileTimeError # 28166
-covariant_test/27: MissingCompileTimeError # 28166
-covariant_test/28: MissingCompileTimeError # 28166
-covariant_test/31: MissingCompileTimeError # 28166
-covariant_test/35: MissingCompileTimeError # 28166
-covariant_test/40: DartkCompileTimeError # 28166
-covariant_test/40b: DartkCompileTimeError # 28166
-covariant_test/42: DartkCompileTimeError # 28166
-covariant_test/46: MissingCompileTimeError # 28166
-covariant_test/46b: MissingCompileTimeError # 28166
-covariant_test/47: MissingCompileTimeError # 28166
-covariant_test/51: MissingCompileTimeError # 28166
-covariant_test/52: DartkCompileTimeError # 28166
-covariant_test/54: DartkCompileTimeError # 28166
-covariant_test/55: MissingCompileTimeError # 28166
-covariant_test/56: DartkCompileTimeError # 28166
-covariant_override_test: DartkCompileTimeError # Issue 28166
 
 # dartk: temporary failure
 mixin_illegal_syntax_test/00: DartkCrash
 
+# Passing for the wrong reason
+language/main_not_a_function_test/01: Pass # Fails if tree shaking is disabled
+
 # dartk: JIT failures
 [ $compiler == dartk && $runtime == vm ]
 config_import_corelib_test: RuntimeError
-enum_syntax_test/05: MissingCompileTimeError
 reify_typevar_static_test/00: MissingCompileTimeError
 type_variable_conflict2_test/06: MissingCompileTimeError
 type_variable_conflict2_test/08: MissingCompileTimeError
@@ -118,7 +89,6 @@
 const_nested_test: RuntimeError
 constructor_duplicate_final_test/01: MissingRuntimeError
 constructor_duplicate_final_test/02: MissingRuntimeError
-custom_await_stack_trace_test: RuntimeError
 cyclic_type_test/00: RuntimeError
 cyclic_type_test/01: RuntimeError
 cyclic_type_test/03: RuntimeError
@@ -127,7 +97,8 @@
 cyclic_type_variable_test/03: Crash
 cyclic_type_variable_test/04: Crash
 cyclic_type_variable_test/none: Crash
-deferred_call_empty_before_load_test: RuntimeError
+deferred_call_empty_before_load_test: RuntimeError # Deferred Loading Issue 28335
+deferred_closurize_load_library_test: RuntimeError
 deferred_constant_list_test: RuntimeError
 deferred_constraints_constants_test/none: RuntimeError
 deferred_constraints_constants_test/reference_after_load: RuntimeError
@@ -204,7 +175,7 @@
 list_literal4_test: RuntimeError
 malformed_test/none: RuntimeError
 map_literal3_test: RuntimeError
-map_literal4_test: RuntimeError  # Checked Mode Issue
+map_literal4_test: RuntimeError  # VM checked mode Issue 28420
 map_literal6_test: RuntimeError
 method_override_test: RuntimeError
 mixin_type_parameters_super_extends_test: RuntimeError
@@ -226,9 +197,9 @@
 regress_28278_test: RuntimeError  # Mirrors Issue
 script1_negative_test: Fail
 script2_negative_test: Fail
-setter_no_getter_call_test/none: RuntimeError
-static_setter_get_test/01: RuntimeError
-switch7_negative_test: Fail
+setter_no_getter_call_test/none: RuntimeError  # Dartk Issue 28418
+static_setter_get_test/01: RuntimeError  # Dartk Issue 28417
+switch7_negative_test: Fail  # Dartk Issue 28416
 try_catch_on_syntax_test/10: MissingRuntimeError  # Dartk Issue 28410
 try_catch_on_syntax_test/11: MissingRuntimeError  # Dartk Issue 28410
 type_checks_in_factory_method_test: RuntimeError
@@ -265,12 +236,12 @@
 
 # New failures after respecting VMOptions in test files
 [ $compiler == dartk && $runtime == vm && $mode == debug]
-hello_dart_test: Crash
+hello_dart_test: Crash  # error: expected: cls.is_type_finalized()
 
 # New failures after respecting VMOptions in test files
 [ $compiler == dartk && $runtime == vm ]
-hello_dart_test: CompileTimeError
-ct_const2_test: Pass, CompileTimeError  # Multitest via multiple VMOptions!
+hello_dart_test: CompileTimeError  # VMOptions=--compile-all causes us to hit "native function VMServiceIO_Shutdown cannot be resolved"
+ct_const2_test: Pass, CompileTimeError  # VMOptions=--compile-all causes us to hit "native function VMServiceIO_Shutdown cannot be resolved"
 disassemble_test: Pass, Crash  # Multitest via multiple VMOptions!
 
 # Failures during Gardening shift: To be triaged!
@@ -288,3 +259,7 @@
 type_checks_in_factory_method_test: Crash
 vm/regress_27671_test: Crash
 vm/type_vm_test: Crash
+
+# Triaged checked mode failures
+[ ($compiler == dartk || $compiler == dartkp) && $checked ]
+language/regress_22728_test: Fail # Dartk Issue 28498
diff --git a/tests/language/regress_28341_test.dart b/tests/language/regress_28341_test.dart
new file mode 100644
index 0000000..9fedfa5
--- /dev/null
+++ b/tests/language/regress_28341_test.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:expect/expect.dart";
+
+enum E {
+  A
+}
+
+main() {
+  Expect.isTrue(E.values == const <E>[E.A]);
+  Expect.isFalse(E.values == const [E.A]);
+}
diff --git a/tests/language/vm/async_await_catch_stacktrace_test.dart b/tests/language/vm/async_await_catch_stacktrace_test.dart
new file mode 100644
index 0000000..f49ce15
--- /dev/null
+++ b/tests/language/vm/async_await_catch_stacktrace_test.dart
@@ -0,0 +1,57 @@
+// 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:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+void main() {
+  x() async {
+    print("Starting!");
+    try {
+      await runAsync();
+    } catch (e, st) {
+      print("Got exception and stacktrace:");
+      var stText = st.toString();
+      print(e);
+      print(stText);
+      // Stacktrace should be something like
+      // #0      runAsync.<runAsync_async_body> (this file)
+      // #1      Future.Future.microtask.<anonymous closure> (dart:async/future.dart:184)
+      // #2      _microtaskLoop (dart:async/schedule_microtask.dart:41)
+      // #3      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
+      // #4      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
+      // #5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)
+
+      // if exception and stacktrace is rethrown correctly, NOT
+
+      // #0      main.<anonymous closure>.async_op (this file)
+      // #1      _asyncErrorWrapperHelper.<anonymous closure> (dart:async:134:33)
+      // #2      _RootZone.runBinary (dart:async/zone.dart:1410:54)
+      // #3      _FutureListener.handleError (dart:async/future_impl.dart:146:20)
+      // #4      _Future._propagateToListeners.handleError (dart:async/future_impl.dart:649:47)
+      // #5      _Future._propagateToListeners (dart:async/future_impl.dart:671:13)
+      // #6      _Future._completeError (dart:async/future_impl.dart:485:5)
+      // #7      _SyncCompleter._completeError (dart:async/future_impl.dart:56:12)
+      // #8      _Completer.completeError (dart:async/future_impl.dart:27:5)
+      // #9      runAsync.async_op (this file)
+      // #10     Future.Future.microtask.<anonymous closure> (dart:async/future.dart:184:26)
+      // #11     _microtaskLoop (dart:async/schedule_microtask.dart:41:5)
+      // #12     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
+      // #13     _runPendingImmediateCallback (dart:isolate:1054:5)
+      // #14     _RawReceivePortImpl._handleMessage (dart:isolate:1104:5)
+
+      Expect.isFalse(stText.contains("propagateToListeners"));
+      Expect.isFalse(stText.contains("_completeError"));
+      Expect.isFalse(stText.contains("main"));
+    }
+    print("Ending!");
+  }
+
+  asyncStart();
+  x().then((_) => asyncEnd());
+}
+
+runAsync() async {
+  throw 'oh no!';
+}
diff --git a/tests/language_strong/cast2_test.dart b/tests/language_strong/cast2_test.dart
index d67c89b..4f613b7 100644
--- a/tests/language_strong/cast2_test.dart
+++ b/tests/language_strong/cast2_test.dart
@@ -22,7 +22,7 @@
   C oc = new C();
   D od = new D();
 
-  (oc as dynamic).bar;  /// 01: runtime error
+  Expect.throws(() => (oc as dynamic).bar, (e) => e is NoSuchMethodError);
 
   // Casts should always evaluate the left-hand side, if only for its effects.
   oc.inc() as dynamic;
diff --git a/tests/language_strong/covariant_override/runtime_check_test.dart b/tests/language_strong/covariant_override/runtime_check_test.dart
index 6f538dc..a47118fe 100644
--- a/tests/language_strong/covariant_override/runtime_check_test.dart
+++ b/tests/language_strong/covariant_override/runtime_check_test.dart
@@ -3,17 +3,14 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import 'package:meta/meta.dart' show checked;
-
-// Test runtime behavior of @checked
 
 class View {
   addChild(View v) {}
   transform(View fn(View v)) {}
 }
 class MyView extends View {
-  addChild(@checked MyView v) {}
-  transform(@checked MyView fn(Object v)) {}
+  addChild(covariant MyView v) {}
+  transform(covariant MyView fn(Object v)) {}
 }
 
 main() {
@@ -25,7 +22,7 @@
 
   mv.transform((_) => new MyView());
 
-  // TODO(jmesserly): these *should* be a cast failures, but DDC is currently
+  // TODO(jmesserly): these *should* be cast failures, but DDC is currently
   // ignoring function type failures w/ a warning at the console...
 
   // * -> * not a subtype of Object -> MyView
diff --git a/tests/language_strong/covariant_override/tear_off_type_test.dart b/tests/language_strong/covariant_override/tear_off_type_test.dart
index 6ed1d09..587c5e2 100644
--- a/tests/language_strong/covariant_override/tear_off_type_test.dart
+++ b/tests/language_strong/covariant_override/tear_off_type_test.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import 'package:meta/meta.dart' show checked;
 
 // If a parameter is directly or indirectly a covariant override, its type in
 // the method tear-off should become Object.
@@ -19,19 +18,19 @@
 typedef void TakeNamedObjectsAndInts({Object a, int b, Object c, int d});
 
 class M1 {
-  method(@checked int a, int b) {}
+  method(covariant int a, int b) {}
 }
 
 class M2 {
-  method(int a, @checked int b) {}
+  method(int a, covariant int b) {}
 }
 
 class C extends Object with M1, M2 {}
 
 class Direct {
-  void positional(@checked int a, int b, @checked int c, int d, int e) {}
-  void optional([@checked int a, int b, @checked int c, int d]) {}
-  void named({@checked int a, int b, @checked int c, int d}) {}
+  void positional(covariant int a, int b, covariant int c, int d, int e) {}
+  void optional([covariant int a, int b, covariant int c, int d]) {}
+  void named({covariant int a, int b, covariant int c, int d}) {}
 }
 
 class Inherited extends Direct {}
@@ -39,11 +38,11 @@
 // ---
 
 class Override1 {
-  void method(@checked int a, int b, int c, int d, int e) {}
+  void method(covariant int a, int b, int c, int d, int e) {}
 }
 
 class Override2 extends Override1 {
-  void method(int a, int b, @checked int c, int d, int e) {}
+  void method(int a, int b, covariant int c, int d, int e) {}
 }
 
 class Override3 extends Override2 {
@@ -53,45 +52,45 @@
 // ---
 
 abstract class Implement1 {
-  void method(@checked int a, int b, int c, int d, int e) {}
+  void method(covariant int a, int b, int c, int d, int e) {}
 }
 
 class Implement2 {
-  void method(int a, @checked int b, int c, int d, int e) {}
+  void method(int a, covariant int b, int c, int d, int e) {}
 }
 
 class Implement3 {
-  void method(int a, int b, @checked int c, int d, int e) {}
+  void method(int a, int b, covariant int c, int d, int e) {}
 }
 
 class Implement4 implements Implement3 {
-  void method(int a, int b, int c, @checked int d, int e) {}
+  void method(int a, int b, int c, covariant int d, int e) {}
 }
 
 class Implement5 implements Implement1, Implement2, Implement4 {
-  void method(int a, int b, int c, int d, @checked int e) {}
+  void method(int a, int b, int c, int d, covariant int e) {}
 }
 
 // ---
 
 class Interface1 {
-  void method(@checked int a, int b, int c, int d, int e) {}
+  void method(covariant int a, int b, int c, int d, int e) {}
 }
 
 class Interface2 {
-  void method(int a, @checked int b, int c, int d, int e) {}
+  void method(int a, covariant int b, int c, int d, int e) {}
 }
 
 class Mixin1 {
-  void method(int a, int b, @checked int c, int d, int e) {}
+  void method(int a, int b, covariant int c, int d, int e) {}
 }
 
 class Mixin2 {
-  void method(int a, int b, int c, @checked int d, int e) {}
+  void method(int a, int b, int c, covariant int d, int e) {}
 }
 
 class Superclass {
-  void method(int a, int b, int c, int d, @checked int e) {}
+  void method(int a, int b, int c, int d, covariant int e) {}
 }
 
 class Mixed extends Superclass
diff --git a/tests/language_strong/unused_overridden_async_test.dart b/tests/language_strong/unused_overridden_async_test.dart
new file mode 100644
index 0000000..37286bb
--- /dev/null
+++ b/tests/language_strong/unused_overridden_async_test.dart
@@ -0,0 +1,33 @@
+// 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';
+
+class Base {
+  Future<int> method() async {
+    throw 'Should be unused';
+  }
+}
+
+class Sub1 extends Base {
+  @override
+  Future<int> method() async {
+    return 1;
+  }
+}
+
+class Sub2 extends Base {
+  @override
+  Future<int> method() async {
+    return 2;
+  }
+}
+
+help(Base object) async {
+  print(await object.method());
+}
+
+main() async {
+  await help(new Sub1());
+  await help(new Sub2());
+}
diff --git a/tests/lib/async/future_or_bad_type_test.dart b/tests/lib/async/future_or_bad_type_test.dart
index a74b30f..f0faf53 100644
--- a/tests/lib/async/future_or_bad_type_test.dart
+++ b/tests/lib/async/future_or_bad_type_test.dart
@@ -19,8 +19,9 @@
 main() {
   // FutureOr<T> should be treated like `dynamic`. Dynamically the `T` is
   // completely ignored. It can be a malformed type.
-  Expect.isTrue(499 is FutureOr<A>);  /// 00: static type warning
-  Expect.isTrue(499 is FutureOr<Does<Not<Exist>>>);  /// 01: static type warning
+  Expect.isTrue(499 is FutureOr<A>);
+  Expect.isTrue(499 is FutureOr<Does<Not<Exist>>>);  /// 00: static type warning
+  Expect.isTrue(499 is FutureOr<A, A>);              /// 01: static type warning
 
   var a = new A();
   Expect.isTrue(a.toString() is String);
diff --git a/tests/lib/convert/utf8_test.dart b/tests/lib/convert/utf8_test.dart
index cc4c7f5..f24dffc 100644
--- a/tests/lib/convert/utf8_test.dart
+++ b/tests/lib/convert/utf8_test.dart
@@ -16,6 +16,7 @@
   }
 
   testDecodeSlice();
+  testErrorOffset();
 }
 
 void testDecodeSlice() {
@@ -43,3 +44,40 @@
   Expect.throws(() => decoder.convert(utf8, 0, 1));
   Expect.throws(() => decoder.convert(utf8, 2, 5));
 }
+
+void testErrorOffset() {
+  // Test that failed convert calls have an offset in the exception.
+  testExn(input, offset) {
+    Expect.throws(() { UTF8.decoder.convert(input); },
+                  (e) => e is FormatException &&
+                         input == e.source &&
+                         offset == e.offset);
+  }
+
+  // Bad encoding, points to first bad byte.
+  testExn([0x80, 0x00], 0);
+  testExn([0xC0, 0x00], 1);
+  testExn([0xE0, 0x00], 1);
+  testExn([0xE0, 0x80, 0x00], 2);
+  testExn([0xF0, 0x00], 1);
+  testExn([0xF0, 0x80, 0x00], 2);
+  testExn([0xF0, 0x80, 0x80, 0x00], 3);
+  testExn([0xF8, 0x00], 0);
+  // Short encoding, points to end.
+  testExn([0xC0], 1);
+  testExn([0xE0], 1);
+  testExn([0xE0, 0x80], 2);
+  testExn([0xF0], 1);
+  testExn([0xF0, 0x80], 2);
+  testExn([0xF0, 0x80, 0x80], 3);
+  // Overlong encoding, points to start of encoding.
+  testExn([0xC0, 0x80], 0);
+  testExn([0xC1, 0xBF], 0);
+  testExn([0xE0, 0x80, 0x80], 0);
+  testExn([0xE0, 0x9F, 0xBF], 0);
+  testExn([0xF0, 0x80, 0x80, 0x80], 0);
+  testExn([0xF0, 0x8F, 0xBF, 0xBF], 0);
+  // Invalid character (value too large, over 0x10FFFF).
+  testExn([0xF4, 0x90, 0x80, 0x80], 0);
+  testExn([0xF7, 0xBF, 0xBF, 0xBF], 0);
+}
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index e15fd0e..c064cd7 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -315,11 +315,6 @@
 async/schedule_microtask_test: Fail  # Preamble file does not correctly implement scheduleImmediate.
 
 [ $compiler == dartanalyzer || $compiler == dart2analyzer ]
-async/future_or_bad_type_test/00: MissingStaticWarning # Issue 28008
-async/future_or_bad_type_test/implements: MissingCompileTimeError # Issue 28008
-async/future_or_non_strong_test: StaticWarning # Issue 28008
-async/future_or_strong_test: StaticWarning # Issue 28008
-
 mirrors/generic_f_bounded_mixin_application_test: StaticWarning # Test Issue
 
 mirrors/redirecting_factory_test/01: StaticWarning # test issue X, The return type 'Class<T2, T1>' of the redirected constructor is not assignable to 'Class<T1, T2>'
diff --git a/tests/lib_strong/collection/list_test.dart b/tests/lib_strong/collection/list_test.dart
index 76cd515..a2ce141 100644
--- a/tests/lib_strong/collection/list_test.dart
+++ b/tests/lib_strong/collection/list_test.dart
@@ -16,23 +16,138 @@
     _list.length = x;
   }
 
-  E operator[](int idx) => _list[idx];
+  E operator [](int idx) => _list[idx];
 
-  void operator[]=(int idx, E value) {
+  void operator []=(int idx, E value) {
     _list[idx] = value;
   }
 }
 
+class MyNoSuchMethodList<E> extends Object
+    with ListMixin<E>
+    implements List<E> {
+  List<E> _list;
+
+  MyNoSuchMethodList(List<E> this._list);
+
+  noSuchMethod(Invocation invocation) {
+    if (invocation.memberName == #length) {
+      if (invocation.isGetter) return _list.length;
+      if (invocation.isSetter) {
+        _list.length = invocation.positionalArguments.first;
+        return null;
+      }
+      return super.noSuchMethod(invocation);
+    }
+    if (invocation.memberName == new Symbol("[]") &&
+        invocation.positionalArguments.length == 1) {
+      return _list[invocation.positionalArguments.first];
+    }
+    if (invocation.memberName == new Symbol("[]=") &&
+        invocation.positionalArguments.length == 2) {
+      _list[invocation.positionalArguments.first] =
+          invocation.positionalArguments[1];
+      return null;
+    }
+    return super.noSuchMethod(invocation);
+  }
+}
+
+// Class that behaves like a list but does not implement List.
+class MyIndexableNoSuchMethod<E> {
+  List<E> _list;
+
+  MyIndexableNoSuchMethod(List<E> this._list);
+
+  noSuchMethod(Invocation invocation) {
+    if (invocation.memberName == #length) {
+      if (invocation.isGetter) return _list.length;
+      if (invocation.isSetter) {
+        _list.length = invocation.positionalArguments.first;
+        return null;
+      }
+      return super.noSuchMethod(invocation);
+    }
+    if (invocation.memberName == new Symbol("prototype")) {
+      return 42;
+    }
+
+    if (invocation.memberName == new Symbol("[]") &&
+        invocation.positionalArguments.length == 1) {
+      return _list[invocation.positionalArguments.first];
+    }
+    if (invocation.memberName == new Symbol("[]=") &&
+        invocation.positionalArguments.length == 2) {
+      _list[invocation.positionalArguments.first] =
+          invocation.positionalArguments[1];
+      return null;
+    }
+    return super.noSuchMethod(invocation);
+  }
+}
+
 void testRetainWhere() {
   List<int> list = <int>[1, 2, 3];
   list.retainWhere((x) => x % 2 == 0);
   Expect.equals(1, list.length);
   Expect.equals(2, list.first);
+  Expect.equals(2, list[0]);
 
   list = new MyList<int>([1, 2, 3]);
   list.retainWhere((x) => x % 2 == 0);
   Expect.equals(1, list.length);
   Expect.equals(2, list.first);
+  Expect.equals(2, list[0]);
+
+  list = new MyNoSuchMethodList<int>([1, 2, 3]);
+  list.retainWhere((x) => x % 2 == 0);
+  Expect.equals(1, list.length);
+  Expect.equals(2, list.first);
+  Expect.equals(2, list[0]);
+
+  // Equivalent tests where the type of the List is known statically.
+  {
+    var l = new MyList<int>([1, 2, 3]);
+    l.retainWhere((x) => x % 2 == 0);
+    Expect.equals(1, l.length);
+    Expect.equals(2, l.first);
+    Expect.equals(2, l[0]);
+  }
+
+  {
+    var l = new MyNoSuchMethodList<int>([1, 2, 3]);
+    l.retainWhere((x) => x % 2 == 0);
+    Expect.equals(1, l.length);
+    Expect.equals(2, l.first);
+    Expect.equals(2, l[0]);
+  }
+
+  // Equivalent tests where the type of the List is not known.
+  {
+    dynamic l = new MyList<int>([1, 2, 3]);
+    l.retainWhere((x) => x % 2 == 0);
+    Expect.equals(1, l.length);
+    Expect.equals(2, l.first);
+    Expect.equals(2, l[0]);
+  }
+
+  {
+    dynamic l = new MyNoSuchMethodList<int>([1, 2, 3]);
+    l.retainWhere((x) => x % 2 == 0);
+    Expect.equals(1, l.length);
+    Expect.equals(2, l.first);
+    Expect.equals(2, l[0]);
+  }
+
+  {
+    dynamic indexable = new MyIndexableNoSuchMethod<int>([1,2,3]);
+    Expect.equals(3, indexable.length);
+    Expect.equals(1, indexable[0]);
+    Expect.equals(3, indexable[2]);
+    indexable.length = 2;
+    Expect.equals(2, indexable.length);
+    Expect.equals(42, indexable.prototype);
+  }
 }
 
 void main() {
diff --git a/tests/lib_strong/html/js_extend_class_test.dart b/tests/lib_strong/html/js_extend_class_test.dart
new file mode 100644
index 0000000..eb6ea57
--- /dev/null
+++ b/tests/lib_strong/html/js_extend_class_test.dart
@@ -0,0 +1,57 @@
+// 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.
+
+@JS()
+library js_extend_class_test;
+
+import 'dart:html';
+
+import 'package:js/js.dart';
+import 'package:js/js_util.dart' as js_util;
+import 'package:expect/minitest.dart';
+
+@JS('Date')
+class JSDate {
+  external get jsField;
+  external get jsMethod;
+}
+
+@JS('Date.prototype.jsField')
+external set datePrototypeJSField(v);
+
+@JS('Date.prototype.jsMethod')
+external set datePrototypeJSMethod(v);
+
+// Extending a JS class with a Dart class is only supported by DDC for now.
+// We extend the Date class instead of a user defined JS class to avoid the
+// hassle of ensuring the JS class exists before we use it.
+class DartJsDate extends JSDate {
+  get dartField => 100;
+  int dartMethod(x) {
+    return x * 2;
+  }
+}
+
+main() {
+  // Monkey-patch the JS Date class.
+  datePrototypeJSField = 42;
+  datePrototypeJSMethod = allowInterop((x) => x * 10);
+
+  group('extend js class', () {
+    test('js class members', () {
+      var bar = new DartJsDate();
+      expect(bar.jsField, equals(42));
+      expect(bar.jsMethod(5), equals(50));
+
+      expect(bar.dartField, equals(100));
+      expect(bar.dartMethod(4), equals(8));
+    });
+
+    test('dart subclass members', () {
+      var bar = new DartJsDate();
+      expect(bar.dartField, equals(100));
+      expect(bar.dartMethod(4), equals(8));
+    });
+  });
+}
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index daef69f..98f7d8f 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -63,8 +63,10 @@
 io/http_proxy_test: Skip
 io/secure_builtin_roots_test: Skip
 
-# This test might be slow on an opt counter threshold bot.
-io/http_basic_test: Pass, Slow
+# These tests might be slow on an opt counter threshold bot.
+# They also time out on the bot occasionally => flaky test issue 28046
+io/http_basic_test: Pass, Slow, Timeout  # Issue 28046
+io/http_launch_test: Pass, Slow, Timeout  # Issue 28046
 
 
 [ $compiler == none && ($runtime == drt || $runtime == dartium) ]
@@ -287,6 +289,9 @@
 io/http_server_close_response_after_error_test: Pass, Timeout # Issue 28370: timeout.
 io/regress_7191_test: Pass, Timeout # Issue 28374: timeout.
 
+[ $runtime == vm && $system == linux && $mode == release && $arch == ia32 && $builder_tag == asan ]
+io/socket_close_test: Pass, Timeout # Issue 28502: timeout.
+
 [ $runtime == dart_precompiled || $mode == product ]
 io/skipping_dart2js_compilations_test: CompileTimeError # Imports dart:mirrors
 io/test_harness_analyzer_test: CompileTimeError # Imports dart:mirrors
@@ -386,15 +391,4 @@
 
 [ $builder_tag == asan && $arch == x64 ]
 io/process_detached_test: Pass, Slow
-
-io/directory_error_test: Fail # Issue 28350
-io/directory_fuzz_test: Fail # Issue 28350
-io/directory_list_nonexistent_test: Fail # Issue 28350
-io/stdout_bad_argument_test: Fail # Issue 28353
-io/file_blocking_lock_test: Fail # Issue 28353
-
-io/process_sync_test: RuntimeError
-io/signals_test: RuntimeError
-io/regress_7191_test: RuntimeError
 io/named_pipe_script_test: RuntimeError
-io/http_server_close_response_after_error_test: RuntimeError
diff --git a/tools/VERSION b/tools/VERSION
index d8a18f8..977d95b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 1
 MINOR 22
 PATCH 0
-PRERELEASE 9
-PRERELEASE_PATCH 1
+PRERELEASE 10
+PRERELEASE_PATCH 0
diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py
index 588061a..3b70f46 100644
--- a/tools/bots/dart_sdk.py
+++ b/tools/bots/dart_sdk.py
@@ -22,26 +22,14 @@
 
 def BuildSDK():
   with bot.BuildStep('Build SDK'):
-    sysroot_env =  dict(os.environ)
     if BUILD_OS == 'linux':
-      ia32root = os.path.join(bot_utils.DART_DIR, '..', 'sysroots',
-                              'build', 'linux', 'debian_wheezy_i386-sysroot')
-      sysroot_env['CXXFLAGS'] = ("--sysroot=%s -I=/usr/include/c++/4.6 "
-               "-I=/usr/include/c++/4.6/i486-linux-gnu") % ia32root
-      sysroot_env['LDFLAGS'] = '--sysroot=%s' % ia32root
-      sysroot_env['CFLAGS'] = '--sysroot=%s' % ia32root
+      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'], env=sysroot_env)
-
-    x64root = os.path.join(bot_utils.DART_DIR, '..', 'sysroots', 'build',
-                           'linux', 'debian_wheezy_amd64-sysroot')
-    if BUILD_OS == 'linux':
-      sysroot_env['CXXFLAGS'] = ("--sysroot=%s -I=/usr/include/c++/4.6 "
-              "-I=/usr/include/c++/4.6/x86_64-linux-gnu") % x64root
-      sysroot_env['LDFLAGS'] = '--sysroot=%s' % x64root
-      sysroot_env['CFLAGS'] = '--sysroot=%s' % x64root
+         '--arch=ia32', 'create_sdk'])
     Run([sys.executable, './tools/build.py', '--mode=release',
-         '--arch=x64', 'create_sdk'], env=sysroot_env)
+         '--arch=x64', 'create_sdk'])
 
 def BuildDartdocAPIDocs(dirname):
   dart_sdk = os.path.join(bot_utils.DART_DIR,
diff --git a/tools/create_pkg_manifest.py b/tools/create_pkg_manifest.py
index f9e4c3a..bc450bc 100755
--- a/tools/create_pkg_manifest.py
+++ b/tools/create_pkg_manifest.py
@@ -66,8 +66,8 @@
   warning = ('<!-- This file is generated by '
              '//dart/tools/create_pkg_manifest.py. DO NOT EDIT -->\n')
   with open(manifest_file, 'w') as manifest:
-    manifest.write(warning)
     manifest.write('<?xml version="1.0" encoding="UTF-8"?>\n')
+    manifest.write(warning)
     manifest.write('<manifest>\n')
     manifest.write('  <projects>\n')
     for path, remote in sorted(deps.iteritems()):
diff --git a/tools/create_sdk.py b/tools/create_sdk.py
index 160844c..f461d3b 100755
--- a/tools/create_sdk.py
+++ b/tools/create_sdk.py
@@ -93,6 +93,9 @@
       help='Where to output the sdk')
   options.add_option("--snapshot_location",
       help='Location of the snapshots.')
+  options.add_option("--copy_libs",
+      action="store_true", default=False,
+      help='Copy dynamically linked libraries to the SDK bin directory.')
   return options.parse_args()
 
 
@@ -131,6 +134,20 @@
   Copy(src, dest)
 
 
+def CopyLibs(out_dir, bin_dir):
+  for library in ['libcrypto', 'libssl']:
+    ext = '.so'
+    if HOST_OS == 'macos':
+      ext = '.dylib'
+    elif HOST_OS == 'win32':
+      ext = '.dll'
+    src = os.path.join(out_dir, library + ext)
+    dst = os.path.join(bin_dir, library + ext)
+    if os.path.isfile(src):
+      copyfile(src, dst)
+      copymode(src, dst)
+
+
 def CopyDartScripts(home, sdk_root):
   for executable in ['dart2js_sdk', 'dartanalyzer_sdk', 'dartfmt_sdk',
                      'pub_sdk', 'dartdoc', 'dartdevc_sdk']:
@@ -313,6 +330,9 @@
   CopyAnalysisSummaries(SNAPSHOT, LIB)
   CopyDevCompilerSdk(HOME, LIB)
 
+  if options.copy_libs:
+    CopyLibs(build_dir, BIN)
+
   # Write the 'version' file
   version = utils.GetVersion()
   versionFile = open(os.path.join(SDK_tmp, 'version'), 'w')
diff --git a/tools/deps/dartium.deps/DEPS b/tools/deps/dartium.deps/DEPS
index 24fd5be..91c3241 100644
--- a/tools/deps/dartium.deps/DEPS
+++ b/tools/deps/dartium.deps/DEPS
@@ -9,7 +9,7 @@
 
 vars.update({
   "dartium_chromium_commit": "7558afb6379171d7f96b2db68ae9d2b64b2c5544",
-  "dartium_webkit_commit": "cdb44f3ddd32f2594e77ef26cd806891597cc1d9",
+  "dartium_webkit_commit": "8c167a4ffeaa5402dde4d9e113bb272b2e4640d2",
   "chromium_base_revision": "338390",
 
   # We use mirrors of all github repos to guarantee reproducibility and
@@ -69,7 +69,7 @@
   "web_components_rev": "@6349e09f9118dce7ae1b309af5763745e25a9d61",
   "WebCore_rev": "@a86fe28efadcfc781f836037a80f27e22a5dad17",
 
-  "co19_rev": "@f05d5aee5930bfd487aedf832fbd7b832f502b15",
+  "co19_rev": "@cf831f58ac65f68f14824c0b1515f6b7814d94b8",
 })
 
 deps.update({
diff --git a/tools/gen_fuchsia_test_manifest.py b/tools/gen_fuchsia_test_manifest.py
new file mode 100755
index 0000000..7993178
--- /dev/null
+++ b/tools/gen_fuchsia_test_manifest.py
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+# Copyright 2017 The Dart project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script creates a qemu image manifest for Fuchsia that contains the
+# Dart tree. In particular in contains Dart's test suite, and test harness.
+
+import argparse
+import json
+import os
+import sys
+import utils
+
+SCRIPT_DIR = os.path.dirname(sys.argv[0])
+DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
+FUCHSIA_ROOT= os.path.realpath(os.path.join(DART_ROOT, '..'))
+
+FUCHSIA_TEST_MANIFEST_PREFIX = os.path.join('test', 'dart')
+
+EXCLUDE_DIRS = [ '.git', 'out', '.jiri' ]
+
+BINARY_FILES = [ 'dart', 'run_vm_tests', 'process_test' ]
+
+def parse_args(args):
+  args = args[1:]
+  parser = argparse.ArgumentParser(
+      description='A script that generates Dart/Fuchsia test commands.')
+
+  parser.add_argument('--arch', '-a',
+      type=str,
+      help='Target architectures (comma-separated).',
+      metavar='[x64]',
+      default='x64')
+  parser.add_argument('--mode', '-m',
+      type=str,
+      help='Build variant',
+      metavar='[debug,release]',
+      default='debug')
+  parser.add_argument('--output', '-o',
+      type=str,
+      help='Path to output file prefix.')
+  parser.add_argument('--user-manifest', '-u',
+      type=str,
+      help='Path to base userspace manifest.')
+  parser.add_argument("-v", "--verbose",
+      help='Verbose output.',
+      default=False,
+      action="store_true")
+
+  return parser.parse_args(args)
+
+
+def fuchsia_arch(arch):
+  if arch is 'x64':
+    return 'x86-64'
+  return None
+
+
+def main(argv):
+  args = parse_args(argv)
+
+  manifest_output = args.output + '.manifest'
+  with open(manifest_output, 'w') as manifest:
+    # First copy the main user manifest.
+    with open(args.user_manifest, 'r') as user_manifest:
+      for line in user_manifest:
+        if '=' in line:
+          manifest.write(line)
+
+    # Now, write the Dart tree.
+    for root, dirs, files in os.walk(DART_ROOT):
+      dirs[:] = [d for d in dirs if d not in EXCLUDE_DIRS]
+      for file in files:
+        filepath = os.path.join(root, file)
+        relpath = filepath[len(DART_ROOT) + 1:]
+        fuchsiapath = os.path.join(FUCHSIA_TEST_MANIFEST_PREFIX, relpath)
+        manifest.write('%s=%s\n' % (fuchsiapath, os.path.join(root, file)))
+
+    dart_conf = utils.GetBuildConf(args.mode, args.arch)
+    dart_out = os.path.join(FUCHSIA_TEST_MANIFEST_PREFIX, 'out', dart_conf)
+    fuchsia_conf = '%s-%s' % (args.mode, fuchsia_arch(args.arch))
+    fuchsia_out = os.path.join(FUCHSIA_ROOT, 'out', fuchsia_conf)
+    for file in BINARY_FILES:
+      manifest.write('%s=%s\n' % (os.path.join(dart_out, file),
+                                  os.path.join(fuchsia_out, file)))
+
+  return 0
+
+
+if __name__ == '__main__':
+  sys.exit(main(sys.argv))
diff --git a/tools/gn.py b/tools/gn.py
index 1e5120b..b30d774 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -140,14 +140,17 @@
                                   and not args.msan
                                   and not args.tsan)
 
-  # Force -mfloat-abi=hard and -mfpu=neon on Linux as we're specifying
-  # a gnueabihf compiler in //build/toolchain/linux BUILD.gn.
-  # TODO(zra): This will likely need some adjustment to build for armv6 etc.
-  hard_float = (gn_args['target_cpu'].startswith('arm') and
-                (gn_args['target_os'] == 'linux'))
-  if hard_float:
-    gn_args['arm_float_abi'] = 'hard'
-    gn_args['arm_use_neon'] = True
+  if gn_args['target_os'] == 'linux':
+    if gn_args['target_cpu'] == 'arm':
+      # Force -mfloat-abi=hard and -mfpu=neon for arm on Linux as we're
+      # specifying a gnueabihf compiler in //build/toolchain/linux BUILD.gn.
+      gn_args['arm_arch'] = 'armv7'
+      gn_args['arm_float_abi'] = 'hard'
+      gn_args['arm_use_neon'] = True
+    elif gn_args['target_cpu'] == 'armv6':
+      raise Exception("GN support for armv6 unimplemented")
+    elif gn_args['target_cpu'] == 'armv5te':
+      raise Exception("GN support for armv5te unimplemented")
 
   gn_args['is_debug'] = mode == 'debug'
   gn_args['is_release'] = mode == 'release'
@@ -202,6 +205,10 @@
     gn_args['use_goma'] = False
     gn_args['goma_dir'] = None
 
+  if args.debug_opt_level:
+    gn_args['dart_debug_optimization_level'] = args.debug_opt_level
+    gn_args['debug_optimization_level'] = args.debug_opt_level
+
   return gn_args
 
 
@@ -310,6 +317,10 @@
       help='Disable Clang',
       dest='clang',
       action='store_false')
+  other_group.add_argument('--debug-opt-level',
+      '-d',
+      help='The optimization level to use for debug builds',
+      type=str)
   other_group.add_argument('--goma',
       help='Use goma',
       default=True,
diff --git a/tools/test.py b/tools/test.py
index 8db546e..d954855 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -28,7 +28,9 @@
     os.environ['PATH'] = '%s%s%s' % (
             os.environ['PATH'], os.pathsep, android_platform_tools)
 
-  exit_code = subprocess.call(command)
+  with utils.CoreDumpArchiver(args):
+    exit_code = subprocess.call(command)
+
   utils.DiagnoseExitCode(exit_code, command)
   return exit_code
 
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 6eb4bab..7e57a60 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -316,25 +316,52 @@
 }
 
 class UnexpectedCrashDumpArchiver extends EventListener {
+  final archivedBinaries = <String, String>{};
+
   void done(TestCase test) {
-    if (test.unexpectedOutput && test.result == Expectation.CRASH) {
-      var name = "core.dart.${test.lastCommandOutput.pid}";
-      var file = new File(name);
-      if (file.existsSync()) {
-        // Find the binary - we assume this is the first part of the command
-        var binName = test.lastCommandExecuted.toString().split(' ').first;
-        var binFile = new File(binName);
-        var binBaseName = new Path(binName).filename;
-        if (binFile.existsSync()) {
-          var tmpPath = new Path(Directory.systemTemp.path);
-          var dir = new Path(TestUtils
-              .mkdirRecursive(
-                  tmpPath, new Path('coredump_${test.lastCommandOutput.pid}'))
-              .path);
-          TestUtils.copyFile(new Path(name), dir.append(name));
-          TestUtils.copyFile(new Path(binName), dir.append(binBaseName));
-          print("\nCopied core dump and binary for unexpected crash to: "
-              "$dir");
+    if (test.unexpectedOutput &&
+        test.result == Expectation.CRASH &&
+        test.lastCommandExecuted is ProcessCommand) {
+      final name = "core.${test.lastCommandOutput.pid}";
+      final file = new File(name);
+      final exists = file.existsSync();
+      if (exists) {
+        final lastCommand = test.lastCommandExecuted as ProcessCommand;
+        // We have a coredump for the process. This coredump will be archived by
+        // CoreDumpArchiver (see tools/utils.py). For debugging purposes we
+        // need to archive the crashed binary as well. To simplify the
+        // archiving code we simply copy binaries into current folder next to
+        // core dumps and name them `core.${mode}_${arch}_${binary_name}`.
+        final binName = lastCommand.executable;
+        final binFile = new File(binName);
+        final binBaseName = new Path(binName).filename;
+        if (!archivedBinaries.containsKey(binName) &&
+            binFile.existsSync()) {
+          final mode = test.configuration['mode'];
+          final arch = test.configuration['arch'];
+          final archived = "binary.${mode}_${arch}_${binBaseName}";
+          TestUtils.copyFile(new Path(binName), new Path(archived));
+          archivedBinaries[binName] = archived;
+        }
+
+        if (archivedBinaries.containsKey(binName)) {
+          // We have found and copied the binary.
+          var coredumpsList;
+          try {
+            coredumpsList =
+                new File('coredumps').openSync(mode: FileMode.APPEND);
+            coredumpsList.writeStringSync(
+                "${test.displayName},${name},${archivedBinaries[binName]}\n");
+          } catch (e) {
+            print('Failed to add crash to coredumps list: ${e}');
+          } finally {
+            try {
+              if (coredumpsList != null)
+                coredumpsList.closeSync();
+            } catch (e) {
+              print('Failed to close coredumps list: ${e}');
+            }
+          }
         }
       }
     }
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index a3b3092..a556912 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -2302,7 +2302,10 @@
   static String outputDir(Map configuration) {
     var result = '';
     var system = configuration['system'];
-    if (system == 'linux' || system == 'android' || system == 'windows') {
+    if (system == 'fuchsia' ||
+        system == 'linux' ||
+        system == 'android' ||
+        system == 'windows') {
       result = 'out/';
     } else if (system == 'macos') {
       result = 'xcodebuild/';
@@ -2412,6 +2415,7 @@
       case 'android':
         os = 'Android';
         break;
+      case 'fuchsia':
       case 'linux':
       case 'macos':
       case 'windows':
diff --git a/tools/utils.py b/tools/utils.py
index 161ea4b..87ee907 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -7,14 +7,31 @@
 
 import commands
 import datetime
+import glob
+import imp
 import json
 import os
 import platform
 import re
 import shutil
 import subprocess
-import tempfile
 import sys
+import tarfile
+import tempfile
+import uuid
+
+try:
+  # Not available on Windows.
+  import resource
+except:
+  pass
+
+DART_DIR = os.path.abspath(
+    os.path.normpath(os.path.join(__file__, '..', '..')))
+
+def GetBotUtils():
+  '''Dynamically load the tools/bots/bot_utils.py python module.'''
+  return imp.load_source('bot_utils', os.path.join(DART_DIR, 'tools', 'bots', 'bot_utils.py'))
 
 class Version(object):
   def __init__(self, channel, major, minor, patch, prerelease,
@@ -657,6 +674,152 @@
     print "Enter directory = ", self._old_cwd
     os.chdir(self._old_cwd)
 
+class CoreDump(object):
+  def __init__(self, test, core, binary):
+    self.test = test
+    self.core = core
+    self.binary = binary
+
+  def __str__(self):
+    return "%s: %s %s" % (self.test, self.binary, self.core)
+
+class CoreDumpArchiver(object):
+  """This class reads coredumps file written by UnexpectedCrashDumpArchiver
+  into the current working directory and uploads all cores and binaries
+  listed in it into Cloud Storage (see tools/testing/dart/test_progress.dart).
+  """
+
+  def __init__(self, args):
+    self._enabled = '--copy-coredumps' in args and GuessOS() == 'linux'
+    self._search_dir = os.getcwd()
+    self._bucket = 'dart-temp-crash-archive'
+    self._old_limits = None
+
+  def __enter__(self):
+    if not self._enabled:
+      return
+
+    # Cleanup any stale coredumps
+    if self._cleanup():
+      print "WARNING: Found and removed stale coredumps"
+
+    self._old_limits = resource.getrlimit(resource.RLIMIT_CORE)
+
+    # Bump core limits to unlimited if core_pattern is correctly configured.
+    if self._check_core_dump_pattern(fatal=False):
+      resource.setrlimit(resource.RLIMIT_CORE, (-1, -1))
+
+  def __exit__(self, *_):
+    if not self._enabled:
+      return
+
+    try:
+      # Restore old core limit.
+      resource.setrlimit(resource.RLIMIT_CORE, self._old_limits)
+
+      # Check that kernel was correctly configured to use core.%p
+      # core_pattern.
+      self._check_core_dump_pattern(fatal=True)
+
+      coredumps = self._find_coredumps()
+      if coredumps:
+        # If we get a ton of crashes, only archive 10 dumps.
+        archive_coredumps = coredumps[:10]
+        print 'Archiving coredumps:'
+        for core in archive_coredumps:
+          print '----> %s' % core
+
+        sys.stdout.flush()
+        self._archive(archive_coredumps)
+
+    finally:
+      self._cleanup()
+
+  def _cleanup(self):
+    found = False
+    for core in glob.glob(os.path.join(self._search_dir, 'core.*')):
+      found = True
+      os.unlink(core)
+    for binary in glob.glob(os.path.join(self._search_dir, 'binary.*')):
+      found = True
+      os.unlink(binary)
+    try:
+      os.unlink(os.path.join(self._search_dir, 'coredumps'))
+      found = True
+    except:
+      pass
+
+    return found
+
+  def _find_coredumps(self):
+    """Load coredumps file. Each line has the following format:
+
+              test-name,core-file,binary-file
+    """
+    try:
+      with open('coredumps') as f:
+        return [CoreDump(*ln.strip('\n').split(',')) for ln in f.readlines()]
+    except:
+      return []
+
+  def _archive(self, coredumps):
+    files = set()
+    for core in coredumps:
+      files.add(core.core)
+      files.add(core.binary)
+    self._upload(files)
+
+  def _upload(self, files):
+    bot_utils = GetBotUtils()
+    gsutil = bot_utils.GSUtil()
+    storage_path = '%s/%s/' % (self._bucket, uuid.uuid4())
+    gs_prefix = 'gs://%s' % storage_path
+    http_prefix = 'https://storage.cloud.google.com/%s' % storage_path
+
+    print '\n--- Uploading into %s (%s) ---' % (gs_prefix, http_prefix)
+    for file in files:
+      # Sanitize the name: actual cores follow 'core.%d' pattern, crashed
+      # binaries are copied next to cores and named 'binary.<binary_name>'.
+      name = os.path.basename(file)
+      (prefix, suffix) = name.split('.', 1)
+      if prefix == 'binary':
+        name = suffix
+
+      tarname = '%s.tar.gz' % name
+
+      # Compress the file.
+      tar = tarfile.open(tarname, mode='w:gz')
+      tar.add(file, arcname=name)
+      tar.close()
+
+      # Remove / from absolute path to not have // in gs path.
+      gs_url = '%s%s' % (gs_prefix, tarname)
+      http_url = '%s%s' % (http_prefix, tarname)
+
+      try:
+        gsutil.upload(tarname, gs_url)
+        print '+++ Uploaded %s (%s)' % (gs_url, http_url)
+      except Exception as error:
+        print '!!! Failed to upload %s, error: %s' % (tarname, error)
+
+      os.unlink(tarname)
+    print '--- Done ---\n'
+
+  def _check_core_dump_pattern(self, fatal=False):
+    core_pattern_file = '/proc/sys/kernel/core_pattern'
+    core_pattern = open(core_pattern_file).read()
+
+    expected_core_pattern = 'core.%p'
+    if core_pattern.strip() != expected_core_pattern:
+      if fatal:
+        message = ('Invalid core_pattern configuration. '
+            'The configuration of core dump handling is *not* correct for '
+            'a buildbot. The content of {0} must be "{1}" instead of "{2}".'
+            .format(core_pattern_file, expected_core_pattern, core_pattern))
+        raise Exception(message)
+      else:
+        return False
+    return True
 
 if __name__ == "__main__":
   import sys